{* * search.tpl * gitphp: A PHP git repository browser * Component: Search view 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 *} {include file='title.tpl' titlecommit=$commit} {if $results} {* Print each match *} {foreach from=$results item=result} {assign var=resulttree value=$result->GetTree()} {/foreach} {if $hasmore} {/if}
{if $searchtype == 'author'} {$result->GetAuthorName()|escape|highlight:$search} {elseif $searchtype == 'committer'} {$result->GetCommitterName()|escape|highlight:$search} {else} {$result->GetAuthorName()|escape} {/if} GetTitle()) > 50}title="{$result->GetTitle()|escape}"{/if}>{$result->GetTitle(50)|escape:'html'} {if $searchtype == 'commit'} {foreach from=$result->SearchComment($search) item=line name=match}
{$line|escape|highlight:$search:50} {/foreach} {/if}
{t}next{/t}
{else}
{t 1=$search}No matches for "%1"{/t}
{/if} {/block}