##// END OF EJS Templates
added fancy file stats to changeset range view
marcink -
r3822:b86229c6 beta
parent child Browse files
Show More
@@ -1,120 +1,125 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} &middot; ${c.rhodecode_name}
5 ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
9 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
10 </%def>
10 </%def>
11
11
12 <%def name="page_nav()">
12 <%def name="page_nav()">
13 ${self.menu('repositories')}
13 ${self.menu('repositories')}
14 </%def>
14 </%def>
15
15
16 <%def name="main()">
16 <%def name="main()">
17 ${self.context_bar('changelog')}
17 ${self.context_bar('changelog')}
18 <div class="box">
18 <div class="box">
19 <!-- box / title -->
19 <!-- box / title -->
20 <div class="title">
20 <div class="title">
21 ${self.breadcrumbs()}
21 ${self.breadcrumbs()}
22 </div>
22 </div>
23 <div class="table">
23 <div class="table">
24 <div id="body" class="diffblock">
24 <div id="body" class="diffblock">
25 <div class="code-header">
25 <div class="code-header">
26 <div>
26 <div>
27 ${h.link_to('r%s:%s -> r%s:%s' % (c.cs_ranges[0].revision, h.short_id(c.cs_ranges[0].raw_id), c.cs_ranges[-1].revision, h.short_id(c.cs_ranges[-1].raw_id)),
27 ${h.link_to('r%s:%s -> r%s:%s' % (c.cs_ranges[0].revision, h.short_id(c.cs_ranges[0].raw_id), c.cs_ranges[-1].revision, h.short_id(c.cs_ranges[-1].raw_id)),
28 h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id)
28 h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id)
29 )}
29 )}
30 </div>
30 </div>
31 </div>
31 </div>
32 </div>
32 </div>
33 <div id="changeset_compare_view_content">
33 <div id="changeset_compare_view_content">
34 <div class="container">
34 <div class="container">
35 <table class="compare_view_commits noborder">
35 <table class="compare_view_commits noborder">
36 %for cnt,cs in enumerate(c.cs_ranges):
36 %for cnt,cs in enumerate(c.cs_ranges):
37 <tr>
37 <tr>
38 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td>
38 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td>
39 <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td>
39 <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td>
40 <td><div class="author">${h.person(cs.author)}</div></td>
40 <td><div class="author">${h.person(cs.author)}</div></td>
41 <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
41 <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
42 <td>
42 <td>
43 %if c.statuses:
43 %if c.statuses:
44 <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div>
44 <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div>
45 %endif
45 %endif
46 </td>
46 </td>
47 <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
47 <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
48 </tr>
48 </tr>
49 %endfor
49 %endfor
50 </table>
50 </table>
51 </div>
51 </div>
52 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
52 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
53 <div class="cs_files">
53 <div class="cs_files">
54 %for cs in c.cs_ranges:
54 %for cs in c.cs_ranges:
55 <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
55 <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
56 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems():
56 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems():
57 <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div>
57 <div class="cs_${change}">
58 <div class="node">
59 ${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}
60 </div>
61 <div class="changes">${h.fancy_file_stats(stats)}</div>
62 </div>
58 %endfor
63 %endfor
59 %endfor
64 %endfor
60 </div>
65 </div>
61 </div>
66 </div>
62
67
63 </div>
68 </div>
64 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
69 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
65 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
70 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
66 %for cs in c.cs_ranges:
71 %for cs in c.cs_ranges:
67 ##${comment.comment_inline_form(cs)}
72 ##${comment.comment_inline_form(cs)}
68 ## diff block
73 ## diff block
69 <div class="h3">
74 <div class="h3">
70 <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a>
75 <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a>
71 <div class="gravatar">
76 <div class="gravatar">
72 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/>
77 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/>
73 </div>
78 </div>
74 <div class="right">
79 <div class="right">
75 <span class="logtags">
80 <span class="logtags">
76 %if len(cs.parents)>1:
81 %if len(cs.parents)>1:
77 <span class="merge">${_('merge')}</span>
82 <span class="merge">${_('merge')}</span>
78 %endif
83 %endif
79 %if h.is_hg(c.rhodecode_repo):
84 %if h.is_hg(c.rhodecode_repo):
80 %for book in cs.bookmarks:
85 %for book in cs.bookmarks:
81 <span class="booktag" title="${_('Bookmark %s') % book}">
86 <span class="booktag" title="${_('Bookmark %s') % book}">
82 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
87 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
83 </span>
88 </span>
84 %endfor
89 %endfor
85 %endif
90 %endif
86 %for tag in cs.tags:
91 %for tag in cs.tags:
87 <span class="tagtag" title="${_('Tag %s') % tag}">
92 <span class="tagtag" title="${_('Tag %s') % tag}">
88 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
93 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
89 %endfor
94 %endfor
90 %if cs.branch:
95 %if cs.branch:
91 <span class="branchtag" title="${_('Branch %s') % cs.branch}">
96 <span class="branchtag" title="${_('Branch %s') % cs.branch}">
92 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
97 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
93 </span>
98 </span>
94 %endif
99 %endif
95 </span>
100 </span>
96 </div>
101 </div>
97 </div>
102 </div>
98 ${diff_block.diff_block(c.changes[cs.raw_id])}
103 ${diff_block.diff_block(c.changes[cs.raw_id])}
99 ##${comment.comments(cs)}
104 ##${comment.comments(cs)}
100
105
101 %endfor
106 %endfor
102 <script type="text/javascript">
107 <script type="text/javascript">
103
108
104 YUE.onDOMReady(function(){
109 YUE.onDOMReady(function(){
105
110
106 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
111 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
107 var act = e.currentTarget.nextElementSibling;
112 var act = e.currentTarget.nextElementSibling;
108
113
109 if(YUD.hasClass(act,'active')){
114 if(YUD.hasClass(act,'active')){
110 YUD.removeClass(act,'active');
115 YUD.removeClass(act,'active');
111 YUD.setStyle(act,'display','none');
116 YUD.setStyle(act,'display','none');
112 }else{
117 }else{
113 YUD.addClass(act,'active');
118 YUD.addClass(act,'active');
114 YUD.setStyle(act,'display','');
119 YUD.setStyle(act,'display','');
115 }
120 }
116 });
121 });
117 })
122 })
118 </script>
123 </script>
119 </div>
124 </div>
120 </%def>
125 </%def>
General Comments 0
You need to be logged in to leave comments. Login now