{* * commitdiff.tpl * gitphp: A PHP git repository browser * Component: Commitdiff view template * * Copyright (C) 2009 Christopher Han *} {include file='header.tpl'} {* Nav *} {include file='title.tpl' titlecommit=$commit}
{assign var=bugpattern value=$project->GetBugPattern()} {assign var=bugurl value=$project->GetBugUrl()} {foreach from=$commit->GetComment() item=line} {$line|htmlspecialchars|buglink:$bugpattern:$bugurl}
{/foreach}
{* Diff each file changed *} {foreach from=$treediff item=filediff}
{if ($filediff->GetStatus() == 'D') || ($filediff->GetStatus() == 'M')} {assign var=localfromtype value=$filediff->GetFromFileType(1)} {$localfromtype}:{if $filediff->GetFromFile()}a/{$filediff->GetFromFile()}{else}{$filediff->GetFromHash()}{/if} {if $filediff->GetStatus() == 'D'} {t}(deleted){/t} {/if} {/if} {if $filediff->GetStatus() == 'M'} -> {/if} {if ($filediff->GetStatus() == 'A') || ($filediff->GetStatus() == 'M')} {assign var=localtotype value=$filediff->GetToFileType(1)} {$localtotype}:{if $filediff->GetToFile()}b/{$filediff->GetToFile()}{else}{$filediff->GetToHash()}{/if} {if $filediff->GetStatus() == 'A'} {t}(new){/t} {/if} {/if}
{if $sidebyside} {include file='filediffsidebyside.tpl' diffsplit=$filediff->GetDiffSplit()} {else} {include file='filediff.tpl' diff=$filediff->GetDiff('', true, true)} {/if} {/foreach}
{include file='footer.tpl'}