Add geshi support to blame page
[gitphp.git] / templates / blame.tpl
Chris Han 1 {*
2 * blame.tpl
3 * gitphp: A PHP git repository browser
4 * Component: Blame view template
5 *
6 * Copyright (C) 2010 Christopher Han <xiphux@gmail.com>
7 *}
8
9 {include file='header.tpl'}
10
11 <div class="page_nav">
Marijn Koesen 12 <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=commit&h={$commit->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=tree&h={$tree->GetHash()}&hb={$commit->GetHash()}">tree</a><br />
13 <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=blob_plain&h={$blob->GetHash()}&f={$blob->GetPath()}">plain</a> |
Chris Han 14 {if $commit->GetHash() != $head->GetHash()}
Marijn Koesen 15 <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=blame&hb=HEAD&f={$blob->GetPath()}">HEAD</a>
Chris Han 16 {else}
Chris Han 17 HEAD
Chris Han 18 {/if}
Chris Han 19 | blame
20 <br />
Chris Han 21 </div>
Chris Han 22
Chris Han 23 {include file='title.tpl' titlecommit=$commit}
Chris Han 24
Chris Han 25 {include file='path.tpl' pathobject=$blob target='blob'}
Chris Han 26
Chris Han 27 <div class="page_body">
Chris Han 28 {if $geshi}
29 {$geshihead}
30 <td class="ln" id="blame">
31 {foreach from=$blob->GetData(true) item=blobline name=blob}
32 {assign var=blamecommit value=$blame[$smarty.foreach.blob.iteration]}
33 {if $blamecommit}
34 {if $opened}</div>{/if}
35 <div class="{cycle values="light,dark"}">
36 {assign var=opened value=true}
37 <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=commit&h={$blamecommit->GetHash()}" title="{$blamecommit->GetTitle()}">{$blamecommit->GetAuthorEpoch()|date_format:"%F %X"}</a>
38 {$blamecommit->GetAuthor()}
39 {/if}
40 &nbsp;<br />
41 {/foreach}
42 {if $opened}</div>{/if}
43 </td>
44 {$geshibody}
45 {$geshifoot}
46 {else}
Chris Han 47 <table class="code">
Chris Han 48 {foreach from=$blob->GetData(true) item=blobline name=blob}
Chris Han 49 {assign var=blamecommit value=$blame[$smarty.foreach.blob.iteration]}
50 {if $blamecommit}
51 {cycle values="light,dark" assign=rowclass}
52 {/if}
53 <tr class="{$rowclass}">
54 <td class="date">
55 {if $blamecommit}
Marijn Koesen 56 <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=commit&h={$blamecommit->GetHash()}" title="{$blamecommit->GetTitle()}">{$blamecommit->GetAuthorEpoch()|date_format:"%F %X"}</a>
Chris Han 57 {/if}
58 </td>
59 <td class="author">
60 {if $blamecommit}
61 {$blamecommit->GetAuthor()}
62 {/if}
63 </td>
64 <td class="num"><a id="l{$smarty.foreach.blob.iteration}" href="#l{$smarty.foreach.blob.iteration}" class="linenr">{$smarty.foreach.blob.iteration}</a></td>
65 <td class="codeline">{$blobline|escape}</td>
66 </tr>
Chris Han 67 {/foreach}
68 </table>
Chris Han 69 {/if}
Chris Han 70 </div>
71
72 {include file='footer.tpl'}
73
comments