##// END OF EJS Templates
diff_block: fix link to file revisions...
Mads Kiilerich -
r3517:f8daaaf1 beta
parent child Browse files
Show More
@@ -1,66 +1,66 b''
1 1 ## -*- coding: utf-8 -*-
2 2 ##usage:
3 3 ## <%namespace name="diff_block" file="/changeset/diff_block.html"/>
4 4 ## ${diff_block.diff_block(change)}
5 5 ##
6 6 <%def name="diff_block(change)">
7 7 <div class="diff-collapse">
8 8 <span target="${'diff-container-%s' % (id(change))}" class="diff-collapse-button">&uarr; ${_('collapse diff')} &uarr;</span>
9 9 </div>
10 10 <div class="diff-container" id="${'diff-container-%s' % (id(change))}">
11 11 %for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems():
12 12 ##%if op !='removed':
13 13 <div id="${FID}_target" style="clear:both;margin-top:25px"></div>
14 14 <div id="${FID}" class="diffblock margined comm">
15 15 <div class="code-header">
16 16 <div class="changeset_header">
17 17 <div class="changeset_file">
18 18 ${h.link_to_if(change!='removed',h.safe_unicode(path),h.url('files_home',repo_name=c.repo_name,
19 19 revision=cs2,f_path=h.safe_unicode(path)))}
20 20 </div>
21 21 <div class="diff-actions">
22 22 <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(path),diff2=cs2,diff1=cs1,diff='diff',fulldiff=1)}" class="tooltip" title="${h.tooltip(_('show full diff for this file'))}"><img class="icon" src="${h.url('/images/icons/page_white_go.png')}"/></a>
23 23 <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(path),diff2=cs2,diff1=cs1,diff='raw')}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
24 24 <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(path),diff2=cs2,diff1=cs1,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a>
25 25 ${c.ignorews_url(request.GET, h.FID(cs2,path))}
26 26 ${c.context_url(request.GET, h.FID(cs2,path))}
27 27 </div>
28 28 <span style="float:right;margin-top:-3px">
29 29 <label>
30 30 ${_('show inline comments')}
31 31 ${h.checkbox('',checked="checked",class_="show-inline-comments",id_for=h.FID(cs2,path))}
32 32 </label>
33 33 </span>
34 34 </div>
35 35 </div>
36 36 <div class="code-body">
37 37 <div class="full_f_path" path="${h.safe_unicode(path)}"></div>
38 38 ${diff|n}
39 39 </div>
40 40 </div>
41 41 ##%endif
42 42 %endfor
43 43 </div>
44 44 </%def>
45 45
46 46 <%def name="diff_block_simple(change)">
47 47
48 48 %for op,filenode_path,diff in change:
49 49 <div id="${h.FID('',filenode_path)}_target" style="clear:both;margin-top:25px"></div>
50 50 <div id="${h.FID('',filenode_path)}" class="diffblock margined comm">
51 51 <div class="code-header">
52 52 <div class="changeset_header">
53 53 <div class="changeset_file">
54 54 ${h.safe_unicode(filenode_path)} |
55 <a class="spantag" href="${h.url('files_home', repo_name=c.repo_name, f_path=filenode_path, revision=c.org_ref)}" title="${_('show file at latest version in this repo')}">${c.org_ref_type}@${h.short_id(c.org_ref) if c.org_ref_type=='rev' else c.org_ref}</a> -&gt;
55 <a class="spantag" href="${h.url('files_home', repo_name=c.other_repo.repo_name, f_path=filenode_path, revision=c.org_ref)}" title="${_('show file at latest version in this repo')}">${c.org_ref_type}@${h.short_id(c.org_ref) if c.org_ref_type=='rev' else c.org_ref}</a> -&gt;
56 56 <a class="spantag" href="${h.url('files_home', repo_name=c.repo_name, f_path=filenode_path, revision=c.other_ref)}" title="${_('show file at initial version in this repo')}">${c.other_ref_type}@${h.short_id(c.other_ref) if c.other_ref_type=='rev' else c.other_ref}</a>
57 57 </div>
58 58 </div>
59 59 </div>
60 60 <div class="code-body">
61 61 <div class="full_f_path" path="${h.safe_unicode(filenode_path)}"></div>
62 62 ${diff|n}
63 63 </div>
64 64 </div>
65 65 %endfor
66 66 </%def>
General Comments 0
You need to be logged in to leave comments. Login now