Mercurial > kallithea
annotate rhodecode/templates/changeset/changeset_range.html @ 2446:c4c36060d5f0 beta
Linkify changesets in compare view for easier jumping to changesets for code-review
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 11 Jun 2012 23:27:27 +0200 |
parents | f467c75544af |
children | 4753a3445ff7 d2a528b60e50 |
rev | line source |
---|---|
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 <%inherit file="/base/base.html"/> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 <%def name="title()"> |
2417
76d156bef5a2
Better i18n for page titles.
Vincent Duvert <vincent@duvert.net>
parents:
2416
diff
changeset
|
5 ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} - ${c.rhodecode_name} |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 </%def> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 <%def name="breadcrumbs_links()"> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 ${h.link_to(u'Home',h.url('/'))} |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 » |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 » |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
13 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
14 </%def> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
15 |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
16 <%def name="page_nav()"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
17 ${self.menu('changelog')} |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 </%def> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
19 |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 <%def name="main()"> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 <div class="box"> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 <!-- box / title --> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
23 <div class="title"> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
24 ${self.breadcrumbs()} |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
25 </div> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 <div class="table"> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 <div id="body" class="diffblock"> |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
28 <div class="code-header cv"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
29 <h3 class="code-header-title">${_('Compare View')}</h3> |
1688
82e604d3fc46
changeset ranges use new fileid method.
Marcin Kuzminski <marcin@python-works.com>
parents:
1602
diff
changeset
|
30 <div> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
31 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
32 </div> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
33 </div> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
34 </div> |
1010
643e4a540ddd
added nicer compare view
Marcin Kuzminski <marcin@python-works.com>
parents:
982
diff
changeset
|
35 <div id="changeset_compare_view_content"> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
36 <div class="container"> |
1602
1915f02f6d62
Ui fixes for tables
Marcin Kuzminski <marcin@python-works.com>
parents:
1258
diff
changeset
|
37 <table class="compare_view_commits noborder"> |
1010
643e4a540ddd
added nicer compare view
Marcin Kuzminski <marcin@python-works.com>
parents:
982
diff
changeset
|
38 %for cs in c.cs_ranges: |
643e4a540ddd
added nicer compare view
Marcin Kuzminski <marcin@python-works.com>
parents:
982
diff
changeset
|
39 <tr> |
643e4a540ddd
added nicer compare view
Marcin Kuzminski <marcin@python-works.com>
parents:
982
diff
changeset
|
40 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),14)}"/></div></td> |
643e4a540ddd
added nicer compare view
Marcin Kuzminski <marcin@python-works.com>
parents:
982
diff
changeset
|
41 <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> |
643e4a540ddd
added nicer compare view
Marcin Kuzminski <marcin@python-works.com>
parents:
982
diff
changeset
|
42 <td><div class="author">${h.person(cs.author)}</div></td> |
2427
f467c75544af
Added h.tooltip to all places that tooltip_title is used.
Marcin Kuzminski <marcin@python-works.com>
parents:
2426
diff
changeset
|
43 <td><span class="tooltip" title="${h.tooltip(h.age(cs.date))}">${h.fmt_date(cs.date)}</span></td> |
2426
b80c2f617d44
removed wrap paragraphs from commit messages as it broke formatting.
Marcin Kuzminski <marcin@python-works.com>
parents:
2417
diff
changeset
|
44 <td><div class="message">${h.urlify_commit(cs.message, c.repo_name)}</div></td> |
1010
643e4a540ddd
added nicer compare view
Marcin Kuzminski <marcin@python-works.com>
parents:
982
diff
changeset
|
45 </tr> |
643e4a540ddd
added nicer compare view
Marcin Kuzminski <marcin@python-works.com>
parents:
982
diff
changeset
|
46 %endfor |
643e4a540ddd
added nicer compare view
Marcin Kuzminski <marcin@python-works.com>
parents:
982
diff
changeset
|
47 </table> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
48 </div> |
1010
643e4a540ddd
added nicer compare view
Marcin Kuzminski <marcin@python-works.com>
parents:
982
diff
changeset
|
49 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
50 <div class="cs_files"> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
51 %for cs in c.cs_ranges: |
2446
c4c36060d5f0
Linkify changesets in compare view for easier jumping to changesets for code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
2427
diff
changeset
|
52 <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> |
1258
3954bdaf6243
fixed possible float division, and changeset ranges bug introduced in stat changeset.
Marcin Kuzminski <marcin@python-works.com>
parents:
1184
diff
changeset
|
53 %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]: |
1777
910e3a0d27c0
removed deprecated self.fid function
Marcin Kuzminski <marcin@python-works.com>
parents:
1688
diff
changeset
|
54 <div class="cs_${change}">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID(cs.raw_id,filenode.path)))}</div> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
55 %endfor |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
56 %endfor |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
57 </div> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
58 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
59 |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
60 </div> |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
61 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
62 <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
63 %for cs in c.cs_ranges: |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
64 ##${comment.comment_inline_form(cs)} |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
65 ## diff block |
2446
c4c36060d5f0
Linkify changesets in compare view for easier jumping to changesets for code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
2427
diff
changeset
|
66 <h3 style="padding-top:8px;">${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))}</h3> |
c4c36060d5f0
Linkify changesets in compare view for easier jumping to changesets for code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
2427
diff
changeset
|
67 |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
68 ${diff_block.diff_block(c.changes[cs.raw_id])} |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
69 ##${comment.comments(cs)} |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
70 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
71 %endfor |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
72 <script type="text/javascript"> |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
73 |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
74 YUE.onDOMReady(function(){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
75 |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
76 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
77 var act = e.currentTarget.nextElementSibling; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
78 |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
79 if(YUD.hasClass(act,'active')){ |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
80 YUD.removeClass(act,'active'); |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
81 YUD.setStyle(act,'display','none'); |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
82 }else{ |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
83 YUD.addClass(act,'active'); |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
84 YUD.setStyle(act,'display',''); |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
85 } |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
86 }); |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1777
diff
changeset
|
87 }) |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
88 </script> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
89 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
90 </%def> |