Fix header css on pages
[gitphp.git] / templates / blame.tpl
blob:a/templates/blame.tpl -> blob:b/templates/blame.tpl
{* {*
* blame.tpl * blame.tpl
* gitphp: A PHP git repository browser * gitphp: A PHP git repository browser
* Component: Blame view template * Component: Blame view template
* *
* Copyright (C) 2010 Christopher Han <xiphux@gmail.com> * Copyright (C) 2010 Christopher Han <xiphux@gmail.com>
*} *}
   
{include file='header.tpl'} {include file='header.tpl'}
   
{* If we managed to look up commit info, we have enough info to display the full header - othewise just use a simple header *} {* If we managed to look up commit info, we have enough info to display the full header - othewise just use a simple header *}
<div class="page_nav"> <div class="page_nav">
{if $fullnav} {if $fullnav}
<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hashbase}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree}&hb={$hashbase}">tree</a><br /> <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hashbase}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree}&hb={$hashbase}">tree</a><br />
{if $file} {if $file}
<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$hash}&f={$file}">plain</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$hash}&f={$file}">plain</a> |
{if ($hashbase != "HEAD") && ($hashbase != $head)} {if ($hashbase != "HEAD") && ($hashbase != $head)}
<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blame&hb=HEAD&f={$file}">HEAD</a> <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blame&hb=HEAD&f={$file}">HEAD</a>
{else} {else}
HEAD HEAD
{/if} {/if}
| blame | blame
<br /> <br />
{else} {else}
<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$hash}">plain</a><br /> <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$hash}">plain</a><br />
{/if} {/if}
{else} {else}
<br /><br /> <br /><br />
{/if} {/if}
</div> </div>
<div> <div class="title">
{if $fullnav} {if $fullnav}
<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase}" class="title">{$title} <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase}" class="title">{$title}
{if $hashbaseref} {if $hashbaseref}
<span class="tag">{$hashbaseref}</span> <span class="tag">{$hashbaseref}</span>
{/if} {/if}
</a> </a>
{else} {else}
<div class="title">{$hash}</div> <div class="title">{$hash}</div>
{/if} {/if}
</div> </div>
<div class="page_path"> <div class="page_path">
{* The path to the file, with directories broken into tree links *} {* The path to the file, with directories broken into tree links *}
<b> <b>
<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project->GetProject()}]</a> / <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project->GetProject()}]</a> /
{foreach from=$paths item=path name=paths} {foreach from=$paths item=path name=paths}
{if $smarty.foreach.paths.last} {if $smarty.foreach.paths.last}
<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$path.tree}&f={$path.full}">{$path.short}</a> <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$path.tree}&f={$path.full}">{$path.short}</a>
{else} {else}
<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> / <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> /
{/if} {/if}
{/foreach} {/foreach}
</b> </b>
</div> </div>
<div class="page_body"> <div class="page_body">
<table class="code"> <table class="code">
{counter name=linecount start=0 print=false} {counter name=linecount start=0 print=false}
{foreach from=$blamedata item=blameitem} {foreach from=$blamedata item=blameitem}
{cycle values="light,dark" assign=rowclass} {cycle values="light,dark" assign=rowclass}
{foreach from=$blameitem.lines name=linegroup item=blameline} {foreach from=$blameitem.lines name=linegroup item=blameline}
{counter name=linecount assign=linenum} {counter name=linecount assign=linenum}
<tr class="{$rowclass}"> <tr class="{$rowclass}">
<td class="num"><a id="l{$linenum}" href="#l{$linenum}" class="linenr">{$linenum}</a></td> <td class="num"><a id="l{$linenum}" href="#l{$linenum}" class="linenr">{$linenum}</a></td>
<td class="date"> <td class="date">
{if $smarty.foreach.linegroup.first} {if $smarty.foreach.linegroup.first}
{if $blameitem.commit} {if $blameitem.commit}
<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$blameitem.commit}" title="{$blameitem.commitdata.summary}">{$blameitem.commitdata.authortime|date_format:"%F %X"}</a> <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$blameitem.commit}" title="{$blameitem.commitdata.summary}">{$blameitem.commitdata.authortime|date_format:"%F %X"}</a>
{else} {else}
{$blameitem.commitdata.authortime|date_format:"%F %X"} {$blameitem.commitdata.authortime|date_format:"%F %X"}
{/if} {/if}
{/if} {/if}
</td> </td>
<td class="author">{if $smarty.foreach.linegroup.first}{$blameitem.commitdata.author}{/if}</td> <td class="author">{if $smarty.foreach.linegroup.first}{$blameitem.commitdata.author}{/if}</td>
<td class="codeline">{$blameline|escape}</td> <td class="codeline">{$blameline|escape}</td>
</tr> </tr>
{/foreach} {/foreach}
{/foreach} {/foreach}
</table> </table>
</div> </div>
   
{include file='footer.tpl'} {include file='footer.tpl'}
   
comments