headlist.tpl 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. {*
  2. * Headlist
  3. *
  4. * Head list template fragment
  5. *
  6. * @author Christopher Han <xiphux@gmail.com>
  7. * @copyright Copyright (c) 2010 Christopher Han
  8. * @packge GitPHP
  9. * @subpackage Template
  10. *}
  11. <table>
  12. {* Loop and display each head *}
  13. {foreach from=$headlist item=head name=heads}
  14. {assign var=headcommit value=$head->GetCommit()}
  15. <tr class="{cycle values="light,dark"}">
  16. <td><em><time datetime="{$headcommit->GetCommitterEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}">{agestring age=$headcommit->GetAge()}</time></em></td>
  17. <td><a href="{if $router->GetCleanUrl()}{geturl project=$project action=heads hash=$head->GetName()}{else}{geturl project=$project action=shortlog hash=$head}{/if}" class="list"><strong>{$head->GetName()}</strong></a></td>
  18. <td class="link"><a href="{geturl project=$project action=shortlog hash=$head}">{t}shortlog{/t}</a> | <a href="{geturl project=$project action=log hash=$head}">{t}log{/t}</a> | <a href="{geturl project=$project action=tree hashbase=$headcommit}">{t}tree{/t}</a></td>
  19. </tr>
  20. {/foreach}
  21. {if $hasmoreheads}
  22. <tr>
  23. {if $source == 'summary'}
  24. <td><a href="{geturl project=$project action=heads}">&hellip;</a></td>
  25. <td></td><td></td>
  26. {else if $source == 'heads'}
  27. <td><a href="{geturl project=$project action=heads page=$page+1}" title="Alt-n">{t}next{/t}</a></td>
  28. <td></td><td></td>
  29. {/if}
  30. </tr>
  31. {/if}
  32. </table>