##// END OF EJS Templates
fixed listings, of commits, added slugs for longer commits messages
marcink -
r141:c29197bd default
parent child Browse files
Show More
@@ -1,42 +1,56 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%!
2 <%!
3 from pylons_app.lib import filters
3 from pylons_app.lib import filters
4 %>
4 %>
5 <table>
5 <table>
6 <%def name="message_slug(msg)">
7 <%
8 limit = 60
9 if len(msg) > limit:
10 return msg[:limit]+'...'
11 else:
12 return msg
13 %>
14 </%def>
6 %for cnt,cs in enumerate(c.repo_changesets):
15 %for cnt,cs in enumerate(c.repo_changesets):
7 <tr class="parity${cnt%2}">
16 <tr class="parity${cnt%2}">
8 <td>${cs._ctx.date()|n,filters.age}</td>
17 <td>${cs._ctx.date()|n,filters.age}</td>
9 <td title="${cs.author}">${cs.author|n,filters.person}</td>
18 <td title="${cs.author}">${cs.author|n,filters.person}</td>
10 <td>${h.link_to(cs.message,h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))}
19 <td>
11 <span class="logtags">
20 ${h.link_to(message_slug(cs.message),
12 <span class="branchtag">${cs.branch}</span>
21 h.url('changeset_home',repo_name=c.repo_name,revision=cs._short),
13 %for tag in cs.tags:
22 title=cs.message)}
14 <span class="tagtag">${tag}</span>
23 </td>
15 %endfor
24 <td>
16 </span>
25 <span class="logtags">
26 <span class="branchtag">${cs.branch}</span>
27 %for tag in cs.tags:
28 <span class="tagtag">${tag}</span>
29 %endfor
30 </span>
17 </td>
31 </td>
18 <td class="nowrap">
32 <td class="nowrap">
19 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))}
33 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))}
20 |
34 |
21 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs._short))}
35 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs._short))}
22 </td>
36 </td>
23 </tr>
37 </tr>
24 %endfor
38 %endfor
25
39
26 </table>
40 </table>
27 <div>
41 <div>
28 <script type="text/javascript">
42 <script type="text/javascript">
29 var data_div = 'shortlog_data';
43 var data_div = 'shortlog_data';
30 YAHOO.util.Event.onDOMReady(function(){
44 YAHOO.util.Event.onDOMReady(function(){
31 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
45 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
32 YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});});
46 YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});});
33 </script>
47 </script>
34 <h2>
48 <h2>
35 ${c.repo_changesets.pager('$link_previous ~2~ $link_next',
49 ${c.repo_changesets.pager('$link_previous ~2~ $link_next',
36 onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{
50 onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{
37 success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText;
51 success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText;
38 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
52 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
39 YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');});
53 YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');});
40 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
54 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
41 </h2>
55 </h2>
42 </div> No newline at end of file
56 </div>
@@ -1,115 +1,127 b''
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2 <%!
2 <%!
3 from pylons_app.lib import filters
3 from pylons_app.lib import filters
4 %>
4 %>
5 <%def name="title()">
5 <%def name="title()">
6 ${_('Repository managment')}
6 ${_('Repository managment')}
7 </%def>
7 </%def>
8 <%def name="breadcrumbs()">
8 <%def name="breadcrumbs()">
9 ${h.link_to(u'Home',h.url('/'))}
9 ${h.link_to(u'Home',h.url('/'))}
10 /
10 /
11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
12 /
12 /
13 ${_('summary')}
13 ${_('summary')}
14 </%def>
14 </%def>
15 <%def name="page_nav()">
15 <%def name="page_nav()">
16 <form action="log">
16 <form action="log">
17 <dl class="search">
17 <dl class="search">
18 <dt><label>Search: </label></dt>
18 <dt><label>Search: </label></dt>
19 <dd><input type="text" name="rev" /></dd>
19 <dd><input type="text" name="rev" /></dd>
20 </dl>
20 </dl>
21 </form>
21 </form>
22
22
23 ${self.menu('summary')}
23 ${self.menu('summary')}
24 </%def>
24 </%def>
25 <%def name="main()">
25 <%def name="main()">
26
26
27 <h2 class="no-link no-border">${_('Mercurial Repository Overview')}</h2>
27 <h2 class="no-link no-border">${_('Mercurial Repository Overview')}</h2>
28 <dl class="overview">
28 <dl class="overview">
29 <dt>${_('name')}</dt>
29 <dt>${_('name')}</dt>
30 <dd>${c.repo_info.name}</dd>
30 <dd>${c.repo_info.name}</dd>
31 <dt>${_('description')}</dt>
31 <dt>${_('description')}</dt>
32 <dd>${c.repo_info.description}</dd>
32 <dd>${c.repo_info.description}</dd>
33 <dt>${_('contact')}</dt>
33 <dt>${_('contact')}</dt>
34 <dd>${c.repo_info.contact}</dd>
34 <dd>${c.repo_info.contact}</dd>
35 <dt>${_('last change')}</dt>
35 <dt>${_('last change')}</dt>
36 <dd>${c.repo_info.last_change|n,filters.rfc822date} - ${c.repo_info.last_change|n,filters.age}</dd>
36 <dd>${c.repo_info.last_change|n,filters.rfc822date} - ${c.repo_info.last_change|n,filters.age}</dd>
37 <dt>${_('url')}</dt>
37 <dt>${_('url')}</dt>
38 <dd><pre>hg clone <a href="${c.clone_repo_url}">${c.clone_repo_url}</a></pre></dd>
38 <dd><pre>hg clone <a href="${c.clone_repo_url}">${c.clone_repo_url}</a></pre></dd>
39 <dt>${_('Download')}</dt>
39 <dt>${_('Download')}</dt>
40 <dd>
40 <dd>
41 %for archive in c.repo_info._get_archives():
41 %for archive in c.repo_info._get_archives():
42 | <a href="/${c.repo_info.name}/archive/${archive['node']}${archive['extension']}">
42 | <a href="/${c.repo_info.name}/archive/${archive['node']}${archive['extension']}">
43 ${c.repo_info.name}.${archive['type']}
43 ${c.repo_info.name}.${archive['type']}
44 </a>
44 </a>
45 %endfor
45 %endfor
46 |
46 |
47 </dd>
47 </dd>
48 </dl>
48 </dl>
49
49
50 <h2>${h.link_to(_('Changes'),h.url('changelog_home',repo_name=c.repo_name))}</h2>
50 <h2>${h.link_to(_('Changes'),h.url('changelog_home',repo_name=c.repo_name))}</h2>
51 <table>
51 <table>
52 <%def name="message_slug(msg)">
53 <%
54 limit = 60
55 if len(msg) > limit:
56 return msg[:limit]+'...'
57 else:
58 return msg
59 %>
60 </%def>
52 %for cnt,cs in enumerate(c.repo_changesets):
61 %for cnt,cs in enumerate(c.repo_changesets):
53 <tr class="parity${cnt%2}">
62 <tr class="parity${cnt%2}">
54 <td>${cs._ctx.date()|n,filters.age}</td>
63 <td>${cs._ctx.date()|n,filters.age}</td>
55 <td>${cs.author}</td>
64 <td>${cs.author|n,filters.person}</td>
56 <td>
65 <td>
57
66 ${h.link_to(message_slug(cs.message),
58 ${h.link_to(cs.message,h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))}
67 h.url('changeset_home',repo_name=c.repo_name,revision=cs._short),
68 title=cs.message)}
69 </td>
70 <td>
59 <span class="logtags">
71 <span class="logtags">
60 <span class="branchtag">${cs.branch}</span>
72 <span class="branchtag">${cs.branch}</span>
61 %for tag in cs.tags:
73 %for tag in cs.tags:
62 <span class="tagtag">${tag}</span>
74 <span class="tagtag">${tag}</span>
63 %endfor
75 %endfor
64 </span>
76 </span>
65 </td>
77 </td>
66 <td class="nowrap">
78 <td class="nowrap">
67 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))}
79 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs._short))}
68 |
80 |
69 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs._short))}
81 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs._short))}
70 </td>
82 </td>
71 </tr>
83 </tr>
72 %endfor
84 %endfor
73 </table>
85 </table>
74
86
75 <h2>${h.link_to(_('Tags'),h.url('tags_home',repo_name=c.repo_name))}</h2>
87 <h2>${h.link_to(_('Tags'),h.url('tags_home',repo_name=c.repo_name))}</h2>
76 <table>
88 <table>
77 %for cnt,tag in enumerate(c.repo_tags):
89 %for cnt,tag in enumerate(c.repo_tags):
78 <tr class="parity${cnt%2}">
90 <tr class="parity${cnt%2}">
79 <td>${tag._ctx.date()|n,filters.age}</td>
91 <td>${tag._ctx.date()|n,filters.age}</td>
80 <td></td>
92 <td></td>
81 <td>
93 <td>
82 <span class="logtags">
94 <span class="logtags">
83 <span class="tagtag">${h.link_to(tag.tags[-1],h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}</span>
95 <span class="tagtag">${h.link_to(tag.tags[-1],h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}</span>
84 </span>
96 </span>
85 </td>
97 </td>
86 <td class="nowrap">
98 <td class="nowrap">
87 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}
99 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}
88 |
100 |
89 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag._short))}
101 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag._short))}
90 </td>
102 </td>
91 </tr>
103 </tr>
92 %endfor
104 %endfor
93 </table>
105 </table>
94
106
95 <h2>${h.link_to(_('Branches'),h.url('branches_home',repo_name=c.repo_name))}</h2>
107 <h2>${h.link_to(_('Branches'),h.url('branches_home',repo_name=c.repo_name))}</h2>
96 <table>
108 <table>
97 %for cnt,branch in enumerate(c.repo_branches):
109 %for cnt,branch in enumerate(c.repo_branches):
98 <tr class="parity${cnt%2}">
110 <tr class="parity${cnt%2}">
99 <td>${branch._ctx.date()|n,filters.age}</td>
111 <td>${branch._ctx.date()|n,filters.age}</td>
100 <td></td>
112 <td></td>
101 <td>
113 <td>
102 <span class="logtags">
114 <span class="logtags">
103 <span class="branchtag">${h.link_to(branch.branch,h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}</span>
115 <span class="branchtag">${h.link_to(branch.branch,h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}</span>
104 </span>
116 </span>
105 </td>
117 </td>
106 <td class="nowrap">
118 <td class="nowrap">
107 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}
119 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}
108 |
120 |
109 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch._short))}
121 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch._short))}
110 </td>
122 </td>
111 </tr>
123 </tr>
112 %endfor
124 %endfor
113 </table>
125 </table>
114
126
115 </%def> No newline at end of file
127 </%def>
General Comments 0
You need to be logged in to leave comments. Login now