##// END OF EJS Templates
use shorter revs in diff block
marcink -
r3400:35f45d00 beta
parent child Browse files
Show More
@@ -1,63 +1,63 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
7
8 %for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems():
8 %for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems():
9 ##%if op !='removed':
9 ##%if op !='removed':
10 <div id="${FID}_target" style="clear:both;margin-top:25px"></div>
10 <div id="${FID}_target" style="clear:both;margin-top:25px"></div>
11 <div id="${FID}" class="diffblock margined comm">
11 <div id="${FID}" class="diffblock margined comm">
12 <div class="code-header">
12 <div class="code-header">
13 <div class="changeset_header">
13 <div class="changeset_header">
14 <div class="changeset_file">
14 <div class="changeset_file">
15 ${h.link_to_if(change!='removed',h.safe_unicode(path),h.url('files_home',repo_name=c.repo_name,
15 ${h.link_to_if(change!='removed',h.safe_unicode(path),h.url('files_home',repo_name=c.repo_name,
16 revision=cs2,f_path=h.safe_unicode(path)))}
16 revision=cs2,f_path=h.safe_unicode(path)))}
17 </div>
17 </div>
18 <div class="diff-actions">
18 <div class="diff-actions">
19 <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>
19 <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>
20 <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>
20 <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>
21 <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>
21 <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>
22 ${c.ignorews_url(request.GET, h.FID(cs2,path))}
22 ${c.ignorews_url(request.GET, h.FID(cs2,path))}
23 ${c.context_url(request.GET, h.FID(cs2,path))}
23 ${c.context_url(request.GET, h.FID(cs2,path))}
24 </div>
24 </div>
25 <span style="float:right;margin-top:-3px">
25 <span style="float:right;margin-top:-3px">
26 <label>
26 <label>
27 ${_('show inline comments')}
27 ${_('show inline comments')}
28 ${h.checkbox('',checked="checked",class_="show-inline-comments",id_for=h.FID(cs2,path))}
28 ${h.checkbox('',checked="checked",class_="show-inline-comments",id_for=h.FID(cs2,path))}
29 </label>
29 </label>
30 </span>
30 </span>
31 </div>
31 </div>
32 </div>
32 </div>
33 <div class="code-body">
33 <div class="code-body">
34 <div class="full_f_path" path="${h.safe_unicode(path)}"></div>
34 <div class="full_f_path" path="${h.safe_unicode(path)}"></div>
35 ${diff|n}
35 ${diff|n}
36 </div>
36 </div>
37 </div>
37 </div>
38 ##%endif
38 ##%endif
39 %endfor
39 %endfor
40
40
41 </%def>
41 </%def>
42
42
43 <%def name="diff_block_simple(change)">
43 <%def name="diff_block_simple(change)">
44
44
45 %for op,filenode_path,diff in change:
45 %for op,filenode_path,diff in change:
46 <div id="${h.FID('',filenode_path)}_target" style="clear:both;margin-top:25px"></div>
46 <div id="${h.FID('',filenode_path)}_target" style="clear:both;margin-top:25px"></div>
47 <div id="${h.FID('',filenode_path)}" class="diffblock margined comm">
47 <div id="${h.FID('',filenode_path)}" class="diffblock margined comm">
48 <div class="code-header">
48 <div class="code-header">
49 <div class="changeset_header">
49 <div class="changeset_header">
50 <div class="changeset_file">
50 <div class="changeset_file">
51 ${h.safe_unicode(filenode_path)} |
51 ${h.safe_unicode(filenode_path)} |
52 <a class="spantag" href="${h.url('files_home', repo_name=c.repo_name, f_path=filenode_path, revision=c.org_ref)}">${c.org_ref_type}@${c.org_ref}</a> -&gt;
52 <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;
53 <a class="spantag" href="${h.url('files_home', repo_name=c.repo_name, f_path=filenode_path, revision=c.other_ref)}">${c.other_ref_type}@${c.other_ref}</a>
53 <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>
54 </div>
54 </div>
55 </div>
55 </div>
56 </div>
56 </div>
57 <div class="code-body">
57 <div class="code-body">
58 <div class="full_f_path" path="${h.safe_unicode(filenode_path)}"></div>
58 <div class="full_f_path" path="${h.safe_unicode(filenode_path)}"></div>
59 ${diff|n}
59 ${diff|n}
60 </div>
60 </div>
61 </div>
61 </div>
62 %endfor
62 %endfor
63 </%def>
63 </%def>
General Comments 0
You need to be logged in to leave comments. Login now