taglist.tpl 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {*
  2. * Taglist
  3. *
  4. * Tag 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 class="tagTable">
  12. {foreach from=$taglist item=tag name=tag}
  13. <tr class="{cycle name=tags values="light,dark"}">
  14. {assign var=object value=$tag->GetObject()}
  15. {assign var=tagcommit value=$tag->GetCommit()}
  16. {assign var=objtype value=$tag->GetType()}
  17. <td><em>{if $tagcommit}<time datetime="{$tagcommit->GetCommitterEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}">{agestring age=$tagcommit->GetAge()}</time>{else}<time datetime="{$tag->GetTaggerEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}">{agestring age=$tag->GetAge()}</time>{/if}</em></td>
  18. <td>
  19. {if $objtype == 'commit'}
  20. <a href="{geturl project=$project action=commit hash=$object}" class="list"><strong>{$tag->GetName()}</strong></a>
  21. {elseif $objtype == 'tag'}
  22. <a href="{geturl project=$project action=tag tag=$tag}" class="list"><strong>{$tag->GetName()}</strong></a>
  23. {elseif $objtype == 'blob'}
  24. <a href="{geturl project=$project action=blob hash=$object}" class="list"><strong>{$tag->GetName()}</strong></a>
  25. {/if}
  26. </td>
  27. <td>
  28. {assign var=comment value=$tag->GetComment()}
  29. {if count($comment) > 0}
  30. <a class="list {if !$tag->LightTag()}tagTip{/if}" href="{geturl project=$project action=tag tag=$tag}">{$comment[0]}</a>
  31. {/if}
  32. </td>
  33. <td class="link">
  34. {if !$tag->LightTag()}
  35. <a href="{geturl project=$project action=tag tag=$tag}">{t}tag{/t}</a> |
  36. {/if}
  37. {if $objtype == 'blob'}
  38. <a href="{geturl project=$project action=blob hash=$object}">{t}blob{/t}</a>
  39. {else}
  40. <a href="{geturl project=$project action=commit hash=$tagcommit}">{t}commit{/t}</a>
  41. | <a href="{geturl project=$project action=shortlog hash=$tagcommit}">{t}shortlog{/t}</a> | <a href="{geturl project=$project action=log hash=$tagcommit}">{t}log{/t}</a> | <a href="{geturl project=$project action=snapshot hash=$tagcommit}" class="snapshotTip">{t}snapshot{/t}</a>
  42. {/if}
  43. </td>
  44. </tr>
  45. {/foreach}
  46. {if $hasmoretags}
  47. <tr>
  48. {if $source == 'summary'}
  49. <td><a href="{geturl project=$project action=tags}">&hellip;</a></td>
  50. <td></td><td></td><td></td>
  51. {else if $source == 'tags'}
  52. <td><a href="{geturl project=$project action=tags page=$page+1}" title="Alt-n">{t}next{/t}</a></td>
  53. <td></td><td></td><td></td>
  54. {/if}
  55. </tr>
  56. {/if}
  57. </table>