diff_block.html
64 lines
| 3.6 KiB
| text/html
|
HtmlLexer
r1787 | ## -*- coding: utf-8 -*- | |||
##usage: | ||||
## <%namespace name="diff_block" file="/changeset/diff_block.html"/> | ||||
r2348 | ## ${diff_block.diff_block(change)} | |||
r1787 | ## | |||
r2348 | <%def name="diff_block(change)"> | |||
r3419 | <div class="diff-collapse"> | |||
|
r3654 | <span target="${'diff-container-%s' % (id(change))}" class="diff-collapse-button">↑ ${_('Collapse diff')} ↑</span> | ||
r3419 | </div> | |||
<div class="diff-container" id="${'diff-container-%s' % (id(change))}"> | ||||
r2995 | %for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems(): | |||
<div id="${FID}_target" style="clear:both;margin-top:25px"></div> | ||||
<div id="${FID}" class="diffblock margined comm"> | ||||
r1787 | <div class="code-header"> | |||
<div class="changeset_header"> | ||||
<div class="changeset_file"> | ||||
|
r3816 | ${h.link_to_if(change!='D',h.safe_unicode(path),h.url('files_home',repo_name=c.repo_name, | ||
r2995 | revision=cs2,f_path=h.safe_unicode(path)))} | |||
r1787 | </div> | |||
r1865 | <div class="diff-actions"> | |||
|
r3654 | <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> | ||
<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> | ||||
<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> | ||||
r2995 | ${c.ignorews_url(request.GET, h.FID(cs2,path))} | |||
${c.context_url(request.GET, h.FID(cs2,path))} | ||||
r1865 | </div> | |||
r1787 | <span style="float:right;margin-top:-3px"> | |||
<label> | ||||
|
r3654 | ${_('Show inline comments')} | ||
r2995 | ${h.checkbox('',checked="checked",class_="show-inline-comments",id_for=h.FID(cs2,path))} | |||
r1787 | </label> | |||
</span> | ||||
</div> | ||||
</div> | ||||
<div class="code-body"> | ||||
r2995 | <div class="full_f_path" path="${h.safe_unicode(path)}"></div> | |||
r1789 | ${diff|n} | |||
r1787 | </div> | |||
</div> | ||||
%endfor | ||||
r3419 | </div> | |||
r1888 | </%def> | |||
r2348 | ||||
<%def name="diff_block_simple(change)"> | ||||
%for op,filenode_path,diff in change: | ||||
<div id="${h.FID('',filenode_path)}_target" style="clear:both;margin-top:25px"></div> | ||||
r2478 | <div id="${h.FID('',filenode_path)}" class="diffblock margined comm"> | |||
r2348 | <div class="code-header"> | |||
<div class="changeset_header"> | ||||
<div class="changeset_file"> | ||||
r3357 | ${h.safe_unicode(filenode_path)} | | |||
|
r3654 | <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> -> | ||
<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> | ||||
r2348 | </div> | |||
</div> | ||||
</div> | ||||
<div class="code-body"> | ||||
<div class="full_f_path" path="${h.safe_unicode(filenode_path)}"></div> | ||||
${diff|n} | ||||
</div> | ||||
</div> | ||||
%endfor | ||||
r2478 | </%def> | |||