# HG changeset patch # User Mads Kiilerich # Date 1452009364 -3600 # Node ID d329bb44e138654f14d4e97f067005d0afb95015 # Parent a02ce1c9a6f08e221229755faedd910ce19f1376 diff: renaming of internal template variables and indentation fix to make similar code more similar diff -r a02ce1c9a6f0 -r d329bb44e138 kallithea/templates/changeset/diff_block.html --- a/kallithea/templates/changeset/diff_block.html Sat Jan 02 11:53:38 2016 +0100 +++ b/kallithea/templates/changeset/diff_block.html Tue Jan 05 16:56:04 2016 +0100 @@ -8,54 +8,54 @@ ↑ ${_('Collapse Diff')} ↑
-%for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems(): -
-
+%for id_fid, (a_rev, cs_rev, op, filename, 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)))} + ${h.link_to_if(op!='D',h.safe_unicode(filename),h.url('files_home',repo_name=c.repo_name, + revision=cs_rev,f_path=h.safe_unicode(filename)))}
- + - + - + - + - ${c.ignorews_url(request.GET, h.FID(cs2,path))} - ${c.context_url(request.GET, h.FID(cs2,path))} + ${c.ignorews_url(request.GET, h.FID(cs_rev,filename))} + ${c.context_url(request.GET, h.FID(cs_rev,filename))}
- +
-
+
${diff|n} - %if path.rsplit('.')[-1] in ['png', 'gif', 'jpg', 'bmp']: + %if filename.rsplit('.')[-1] in ['png', 'gif', 'jpg', 'bmp']:
Show images
- %if change =='M': - + %if op == 'M': + %endif
- %if change in 'DM': - + %if op in 'DM': + %endif - %if change in 'AM': - + %if op in 'AM': + %endif
%endif @@ -72,58 +72,58 @@
%for fid, ch, f, stat in files: <% - op, filenode_path, diff = changes[fid] + op, filename, 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)} -
-
-
-
+
+
+
+
+
+ ${h.safe_unicode(filename)} | + ## 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']: + %if filename.rsplit('.')[-1] in ['png', 'gif', 'jpg', 'bmp']:
Show images
%if op == 'M': - + %endif
%if op in 'DM': - + %endif %if op in 'AM': - + %endif
%endif