##// 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 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 ##usage:
2 ##usage:
3 ## <%namespace name="diff_block" file="/changeset/diff_block.html"/>
3 ## <%namespace name="diff_block" file="/changeset/diff_block.html"/>
4 ## ${diff_block.diff_block(change)}
4 ## ${diff_block.diff_block(change)}
5 ##
5 ##
6 <%def name="diff_block(change)">
6 <%def name="diff_block(change)">
7 <div class="diff-collapse">
7 <div class="diff-collapse">
8 <span target="${'diff-container-%s' % (id(change))}" class="diff-collapse-button">&uarr; ${_('collapse diff')} &uarr;</span>
8 <span target="${'diff-container-%s' % (id(change))}" class="diff-collapse-button">&uarr; ${_('collapse diff')} &uarr;</span>
9 </div>
9 </div>
10 <div class="diff-container" id="${'diff-container-%s' % (id(change))}">
10 <div class="diff-container" id="${'diff-container-%s' % (id(change))}">
11 %for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems():
11 %for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems():
12 ##%if op !='removed':
12 ##%if op !='removed':
13 <div id="${FID}_target" style="clear:both;margin-top:25px"></div>
13 <div id="${FID}_target" style="clear:both;margin-top:25px"></div>
14 <div id="${FID}" class="diffblock margined comm">
14 <div id="${FID}" class="diffblock margined comm">
15 <div class="code-header">
15 <div class="code-header">
16 <div class="changeset_header">
16 <div class="changeset_header">
17 <div class="changeset_file">
17 <div class="changeset_file">
18 ${h.link_to_if(change!='removed',h.safe_unicode(path),h.url('files_home',repo_name=c.repo_name,
18 ${h.link_to_if(change!='removed',h.safe_unicode(path),h.url('files_home',repo_name=c.repo_name,
19 revision=cs2,f_path=h.safe_unicode(path)))}
19 revision=cs2,f_path=h.safe_unicode(path)))}
20 </div>
20 </div>
21 <div class="diff-actions">
21 <div class="diff-actions">
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>
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 <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>
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 <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>
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 ${c.ignorews_url(request.GET, h.FID(cs2,path))}
25 ${c.ignorews_url(request.GET, h.FID(cs2,path))}
26 ${c.context_url(request.GET, h.FID(cs2,path))}
26 ${c.context_url(request.GET, h.FID(cs2,path))}
27 </div>
27 </div>
28 <span style="float:right;margin-top:-3px">
28 <span style="float:right;margin-top:-3px">
29 <label>
29 <label>
30 ${_('show inline comments')}
30 ${_('show inline comments')}
31 ${h.checkbox('',checked="checked",class_="show-inline-comments",id_for=h.FID(cs2,path))}
31 ${h.checkbox('',checked="checked",class_="show-inline-comments",id_for=h.FID(cs2,path))}
32 </label>
32 </label>
33 </span>
33 </span>
34 </div>
34 </div>
35 </div>
35 </div>
36 <div class="code-body">
36 <div class="code-body">
37 <div class="full_f_path" path="${h.safe_unicode(path)}"></div>
37 <div class="full_f_path" path="${h.safe_unicode(path)}"></div>
38 ${diff|n}
38 ${diff|n}
39 </div>
39 </div>
40 </div>
40 </div>
41 ##%endif
41 ##%endif
42 %endfor
42 %endfor
43 </div>
43 </div>
44 </%def>
44 </%def>
45
45
46 <%def name="diff_block_simple(change)">
46 <%def name="diff_block_simple(change)">
47
47
48 %for op,filenode_path,diff in change:
48 %for op,filenode_path,diff in change:
49 <div id="${h.FID('',filenode_path)}_target" style="clear:both;margin-top:25px"></div>
49 <div id="${h.FID('',filenode_path)}_target" style="clear:both;margin-top:25px"></div>
50 <div id="${h.FID('',filenode_path)}" class="diffblock margined comm">
50 <div id="${h.FID('',filenode_path)}" class="diffblock margined comm">
51 <div class="code-header">
51 <div class="code-header">
52 <div class="changeset_header">
52 <div class="changeset_header">
53 <div class="changeset_file">
53 <div class="changeset_file">
54 ${h.safe_unicode(filenode_path)} |
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 <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>
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 </div>
57 </div>
58 </div>
58 </div>
59 </div>
59 </div>
60 <div class="code-body">
60 <div class="code-body">
61 <div class="full_f_path" path="${h.safe_unicode(filenode_path)}"></div>
61 <div class="full_f_path" path="${h.safe_unicode(filenode_path)}"></div>
62 ${diff|n}
62 ${diff|n}
63 </div>
63 </div>
64 </div>
64 </div>
65 %endfor
65 %endfor
66 </%def>
66 </%def>
General Comments 0
You need to be logged in to leave comments. Login now