Modified display.git_summary.php so that description links to the project page as well (conform to gitweb behaviour)
[gitphp.git] / templates / projectlist.tpl
blob:a/templates/projectlist.tpl -> blob:b/templates/projectlist.tpl
{* {*
* projectlist.tpl * projectlist.tpl
* gitphp: A PHP git repository browser * gitphp: A PHP git repository browser
* Component: Project list template * Component: Project list template
* *
* Copyright (C) 2009 Christopher Han <xiphux@gmail.com> * Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
*} *}
   
{include file='header.tpl'} {include file='header.tpl'}
   
{include file='hometext.tpl'} {include file='hometext.tpl'}
   
{if $message} {if $message}
{* Something is wrong; display an error message instead of trying to list *} {* Something is wrong; display an error message instead of trying to list *}
{include file='message.tpl'} {include file='message.tpl'}
{else} {else}
<table cellspacing="0"> <table cellspacing="0">
{* Header *} {* Header *}
<tr> <tr>
{if $order == "project"} {if $order == "project"}
<th>Project</th> <th>Project</th>
{else} {else}
<th><a class="header" href="{$SCRIPT_NAME}?o=project">Project</a></th> <th><a class="header" href="{$SCRIPT_NAME}?o=project">Project</a></th>
{/if} {/if}
{if $order == "descr"} {if $order == "descr"}
<th>Description</th> <th>Description</th>
{else} {else}
<th><a class="header" href="{$SCRIPT_NAME}?o=descr">Description</a></th> <th><a class="header" href="{$SCRIPT_NAME}?o=descr">Description</a></th>
{/if} {/if}
{if $order == "owner"} {if $order == "owner"}
<th>Owner</th> <th>Owner</th>
{else} {else}
<th><a class="header" href="{$SCRIPT_NAME}?o=owner">Owner</a></th> <th><a class="header" href="{$SCRIPT_NAME}?o=owner">Owner</a></th>
{/if} {/if}
{if $order == "age"} {if $order == "age"}
<th>Last Change</th> <th>Last Change</th>
{else} {else}
<th><a class="header" href="{$SCRIPT_NAME}?o=age">Last Change</a></th> <th><a class="header" href="{$SCRIPT_NAME}?o=age">Last Change</a></th>
{/if} {/if}
<th>Actions</th> <th>Actions</th>
</tr> </tr>
   
{if $categorizedprojects} {if $categorizedprojects}
{* Show categorized; categorized project lists nested associatively in the project {* Show categorized; categorized project lists nested associatively in the project
list by category key *} list by category key *}
{foreach from=$categorizedprojects key=categ item=plist} {foreach from=$categorizedprojects key=categ item=plist}
{if $categ != "none"} {if $categ != "none"}
<tr> <tr>
<th>{$categ}</th> <th>{$categ}</th>
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
{/if} {/if}
{section name=proj loop=$plist} {section name=proj loop=$plist}
<tr class="{cycle values="light,dark"}"> <tr class="{cycle values="light,dark"}">
<td> <td>
<a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=summary" class="list {if $categ != "none"}indent{/if}">{$plist[proj].project}</a> <a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=summary" class="list {if $categ != "none"}indent{/if}">{$plist[proj].project}</a>
</td> </td>
<td>{$plist[proj].descr}</td> <td><a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=summary" class="list {if $categ != "none"}indent{/if}">{$plist[proj].descr}</a></td>
<td><i>{$plist[proj].owner}</i></td> <td><i>{$plist[proj].owner}</i></td>
<td> <td>
{if $plist[proj].age < 7200} {* 60*60*2, or 2 hours *} {if $plist[proj].age < 7200} {* 60*60*2, or 2 hours *}
<span class="agehighlight"><b><i>{$plist[proj].age_string}</i></b></span> <span class="agehighlight"><b><i>{$plist[proj].age_string}</i></b></span>
{elseif $plist[proj].age < 172800} {* 60*60*24*2, or 2 days *} {elseif $plist[proj].age < 172800} {* 60*60*24*2, or 2 days *}
<span class="agehighlight"><i>{$plist[proj].age_string}</i></span> <span class="agehighlight"><i>{$plist[proj].age_string}</i></span>
{else} {else}
<i>{$plist[proj].age_string}</i> <i>{$plist[proj].age_string}</i>
{/if} {/if}
</td> </td>
<td class="link"><a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=tree">tree</a> | <a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=snapshot&h=HEAD">snapshot</a></td> <td class="link"><a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=tree">tree</a> | <a href="{$SCRIPT_NAME}?p={$plist[proj].project}&a=snapshot&h=HEAD">snapshot</a></td>
</tr> </tr>
{/section} {/section}
{/foreach} {/foreach}
   
{else} {else}
{* Show flat uncategorized project array *} {* Show flat uncategorized project array *}
{section name=proj loop=$projects} {section name=proj loop=$projects}
<tr class="{cycle values="light,dark"}"> <tr class="{cycle values="light,dark"}">
<td> <td>
<a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=summary" class="list">{$projects[proj].project}</a> <a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=summary" class="list">{$projects[proj].project}</a>
</td> </td>
<td>{$projects[proj].descr}</td> <td><a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=summary" class="list">{$projects[proj].descr}</a></td>
<td><i>{$projects[proj].owner}</i></td> <td><i>{$projects[proj].owner}</i></td>
<td> <td>
{if $projects[proj].age < 7200} {* 60*60*2, or 2 hours *} {if $projects[proj].age < 7200} {* 60*60*2, or 2 hours *}
<span class="agehighlight"><b><i>{$projects[proj].age_string}</i></b></span> <span class="agehighlight"><b><i>{$projects[proj].age_string}</i></b></span>
{elseif $projects[proj].age < 172800} {* 60*60*24*2, or 2 days *} {elseif $projects[proj].age < 172800} {* 60*60*24*2, or 2 days *}
<span class="agehighlight"><i>{$projects[proj].age_string}</i></span> <span class="agehighlight"><i>{$projects[proj].age_string}</i></span>
{else} {else}
<i>{$projects[proj].age_string}</i> <i>{$projects[proj].age_string}</i>
{/if} {/if}
</td> </td>
<td class="link"><a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=tree">tree</a> | <a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=snapshot&h=HEAD">snapshot</a></td> <td class="link"><a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=tree">tree</a> | <a href="{$SCRIPT_NAME}?p={$projects[proj].project}&a=snapshot&h=HEAD">snapshot</a></td>
</tr> </tr>
{/section} {/section}
   
{/if} {/if}
   
</table> </table>
{/if} {/if}
   
{include file='footer.tpl'} {include file='footer.tpl'}
   
   
comments