Show filenames in diff
Show filenames in diff

--- a/templates/commitdiff_item.tpl
+++ b/templates/commitdiff_item.tpl
@@ -7,16 +7,16 @@
  *}
  {if $status == "A"}
    <div class="diff_info">
-   {$to_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$to_id}&hb={$hash}&f={$file}">{$to_id}</a>(new)
+   {$to_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$to_id}&hb={$hash}&f={$file}">{if $file}{$file}{else}{$to_id}{/if}</a>(new)
    </div>
  {elseif $status == "D"}
    <div class="diff_info">
-   {$from_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$from_id}&hb={$hash}&f={$file}">{$from_id}</a>(deleted)
+   {$from_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$from_id}&hb={$hash}&f={$file}">{if $file}{$file}{else}{$from_id}{/if}</a>(deleted)
    </div>
  {elseif $status == "M"}
    {if $from_id != $to_id}
      <div class="diff_info">
-     {$from_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$from_id}&hb={$hash}&f={$file}">{$from_id}</a> -&gt; {$to_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$to_id}&hb={$hash}&f={$file}">{$to_id}</a>
+     {$from_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$from_id}&hb={$hash}&f={$file}">{if $file}a/{$file}{else}{$from_id}{/if}</a> -&gt; {$to_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$to_id}&hb={$hash}&f={$file}">{if $file}b/{$file}{else}{$to_id}{/if}</a>
      </div>
    {/if}
  {/if}

comments