1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
{*
* blobdiff.tpl
* gitphp: A PHP git repository browser
* Component: Blobdiff view template
*
* Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
*}
{include file='header.tpl'}
<div class="page_nav">
{include file='nav.tpl' treecommit=$commit}
<br />
<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=blobdiff&h={$blob->GetHash()}&hp={$blobparent->GetHash()}&hb={$commit->GetHash()}&f={$file}">{t}unified{/t}</a> |
<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=blobdiff_plain&h={$blob->GetHash()}&hp={$blobparent->GetHash()}&f={$file}">{t}plain{/t}</a>
</div>
{include file='title.tpl' titlecommit=$commit}
{include file='path.tpl' pathobject=$blobparent target='blob'}
<div class="page_body">
<div class="diff_info">
{* Display the from -> to diff header *}
{t}blob{/t}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=blob&h={$blobparent->GetHash()}&hb={$commit->GetHash()}&f={$file}">{if $file}a/{$file}{else}{$blobparent->GetHash()}{/if}</a> -> {t}blob{/t}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=blob&h={$blob->GetHash()}&hb={$commit->GetHash()}&f={$file}">{if $file}b/{$file}{else}{$blob->GetHash()}{/if}</a>
</div>
{* Display the sidebysidediff *}
<table class="diffTable">
{foreach from=$filediff->GetDiffSplit() item=lineinfo}
{if $lineinfo[0]=='added'}
<tr class="diff-added">
{elseif $lineinfo[0]=='deleted'}
<tr class="diff-deleted">
{elseif $lineinfo[0]=='modified'}
<tr class="diff-modified">
{else}
<tr>
{/if}
<td class="diff-left">{$lineinfo[1]|escape}</td>
<td>{$lineinfo[2]|escape}</td>
</tr>
{/foreach}
</table>
</div>
{include file='footer.tpl'}
|