{* * searchfiles.tpl * gitphp: A PHP git repository browser * Component: Search files template * * Copyright (C) 2009 Christopher Han *} {extends file='projectbase.tpl'} {block name=links append} {if $page > 0} {/if} {if $hasmore} {/if} {/block} {block name=main} {* Nav *}
{$commit->GetTitle()|escape:'html'}
{if $results} {* Print each match *} {foreach from=$results item=result} {assign var=resultobject value=$result->GetObject()} {if $resultobject instanceof GitPHP_Tree} {else} {/if} {/foreach} {if $hasmore} {/if}
{$result->GetPath()|highlight:$search} {$result->GetPath()|highlight:$search} {foreach from=$result->GetMatchingLines() item=line name=match key=lineno} {if $smarty.foreach.match.first}
{/if}{$lineno}. {$line|highlight:$search:50:true}
{/foreach}
{t}next{/t}
{else}
{t 1=$search}No matches for "%1"{/t}
{/if} {/block}