{* * projectlist.tpl * gitphp: A PHP git repository browser * Component: Project list template * * Copyright (C) 2009 Christopher Han *} {extends file='main.tpl'} {block name=javascript} require.deps = ['projectlist']; {if file_exists('js/projectlist.min.js')} require.paths.projectlist = "projectlist.min"; {/if} {/block} {block name=main}
{if file_exists('templates/hometext.tpl') } {include file='hometext.tpl'} {else} {* default header *}

git source code archive

{/if}
{t}Search projects{/t}: X {if $javascript}{/if}
{foreach name=projects from=$projectlist item=proj} {if $smarty.foreach.projects.first} {* Header *} {if $sort == "project"} {else} {/if} {if $sort == "descr"} {else} {/if} {if $sort == "owner"} {else} {/if} {if $sort == "age"} {else} {/if} {/if} {if $currentcategory != $proj->GetCategory()} {assign var=currentcategory value=$proj->GetCategory()} {if $currentcategory != ''} {/if} {/if} {assign var=projecthead value=$proj->GetHeadCommit()} {foreachelse} {if $search}
{t 1=$search}No matches found for "%1"{/t}
{else}
{t}No projects found{/t}
{/if} {/foreach}
{t}Project{/t}{t}Project{/t}{t}Description{/t}{t}Description{/t}{t}Owner{/t}{t}Owner{/t}{t}Last Change{/t}{t}Last Change{/t}{t}Actions{/t}
{$currentcategory}
{$proj->GetProject()} {$proj->GetDescription()|escape} {$proj->GetOwner()|escape:'html'} {if $projecthead} {if $proj->GetAge() < 7200} {* 60*60*2, or 2 hours *} {elseif $proj->GetAge() < 172800} {* 60*60*24*2, or 2 days *} {else} {/if} {else} {t}No commits{/t} {/if}
{/block} {block name=footer} {/block}