# HG changeset patch # User Søren Løvborg # Date 1441035775 -7200 # Node ID e553602fd5be0b9948e675c902c96b8e118a7340 # Parent 786640c577f357f0aca9eba2398b710bdd8cd8c8 templates: use short_ref instead of manually checking ref type There's a function that does this already. diff -r 786640c577f3 -r e553602fd5be kallithea/templates/changeset/diff_block.html --- a/kallithea/templates/changeset/diff_block.html Tue Sep 08 19:43:29 2015 +0200 +++ b/kallithea/templates/changeset/diff_block.html Mon Aug 31 17:42:55 2015 +0200 @@ -77,19 +77,19 @@ ## TODO: link to ancestor and head of other instead of exactly other %if op == 'A': ${_('Added')} - ${h.short_id(c.cs_ref_name) if c.cs_ref_type=='rev' else c.cs_ref_name} + ${h.short_ref(c.cs_ref_type, c.cs_ref_name)} %elif op == 'M': - ${h.short_id(c.a_ref_name) if c.a_ref_type=='rev' else c.a_ref_name} + ${h.short_ref(c.a_ref_type, c.a_ref_name)} - ${h.short_id(c.cs_ref_name) if c.cs_ref_type=='rev' else c.cs_ref_name} + ${h.short_ref(c.cs_ref_type, c.cs_ref_name)} %elif op == 'D': ${_('Deleted')} - ${h.short_id(c.a_ref_name) if c.a_ref_type=='rev' else c.a_ref_name} + ${h.short_ref(c.a_ref_type, c.a_ref_name)} %elif op == 'R': ${_('Renamed')} - ${h.short_id(c.a_ref_name) if c.a_ref_type=='rev' else c.a_ref_name} + ${h.short_ref(c.a_ref_type, c.a_ref_name)} - ${h.short_id(c.cs_ref_name) if c.cs_ref_type=='rev' else c.cs_ref_name} + ${h.short_ref(c.cs_ref_type, c.cs_ref_name)} %else: ${op}??? %endif