## -*- coding: utf-8 -*- ##usage: ## <%namespace name="diff_block" file="/changeset/diff_block.html"/> ## ${diff_block.diff_block(change)} ## <%def name="diff_block(change)">
↑ ${_('Collapse Diff')} ↑
%for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems():
${h.link_to_if(change!='D',h.safe_unicode(path),h.url('files_home',repo_name=c.repo_name, revision=cs2,f_path=h.safe_unicode(path)))}
${c.ignorews_url(request.GET, h.FID(cs2,path))} ${c.context_url(request.GET, h.FID(cs2,path))}
${diff|n} %if path.rsplit('.')[-1] in ['png', 'gif', 'jpg', 'bmp']:
Show images
%if change =='M': %endif
%if change in 'DM': %endif %if change in 'AM': %endif
%endif
%endfor
<%def name="diff_block_simple(files, changes)"> %for fid, ch, f, stat in files: <% op, filenode_path, diff = changes[fid] %>
${h.safe_unicode(filenode_path)} | ## TODO: link to ancestor and head of other instead of exactly other %if op == 'A': ${_('Added')} ${h.short_ref(c.cs_ref_type, c.cs_ref_name)} %elif op == 'M': ${h.short_ref(c.a_ref_type, c.a_ref_name)} ${h.short_ref(c.cs_ref_type, c.cs_ref_name)} %elif op == 'D': ${_('Deleted')} ${h.short_ref(c.a_ref_type, c.a_ref_name)} %elif op == 'R': ${_('Renamed')} ${h.short_ref(c.a_ref_type, c.a_ref_name)} ${h.short_ref(c.cs_ref_type, c.cs_ref_name)} %else: ${op}??? %endif
${c.ignorews_url(request.GET)} ${c.context_url(request.GET)}
${diff|n} %if filenode_path.rsplit('.')[-1] in ['png', 'gif', 'jpg', 'bmp']:
Show images
%if op == 'M': %endif
%if op in 'DM': %endif %if op in 'AM': %endif
%endif
%endfor <%def name="diff_block_js()">