tag.tpl 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. {*
  2. * tag.tpl
  3. * gitphp: A PHP git repository browser
  4. * Component: Tag view template
  5. *
  6. * Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
  7. *}
  8. {extends file='projectbase.tpl'}
  9. {block name=main}
  10. {* Nav *}
  11. <div class="page_nav">
  12. {include file='nav.tpl' commit=$head treecommit=$head}
  13. <br /><br />
  14. </div>
  15. {* Tag data *}
  16. {assign var=object value=$tag->GetObject()}
  17. {assign var=objtype value=$tag->GetType()}
  18. <div class="title">
  19. {if $objtype == 'blob'}
  20. <a href="{geturl project=$project action=blob hash=$object}" class="title">{$tag->GetName()}</a>
  21. {else}
  22. <a href="{geturl project=$project action=commit hash=$object}" class="title">{$tag->GetName()}</a>
  23. {/if}
  24. </div>
  25. <div class="title_text">
  26. <table>
  27. <tr>
  28. <td>{t}object{/t}</td>
  29. {if $objtype == 'commit'}
  30. <td class="monospace"><a href="{geturl project=$project action=commit hash=$object}" class="list">{$object->GetHash()}</a></td>
  31. <td class="link"><a href="{geturl project=$project action=commit hash=$object}">{t}commit{/t}</a></td>
  32. {elseif $objtype == 'tag'}
  33. <td class="monospace"><a href="{geturl project=$project action=tag tag=$object}" class="list">{$object->GetHash()}</a></td>
  34. <td class="link"><a href="{geturl project=$project action=tag tag=$object}">{t}tag{/t}</a></td>
  35. {elseif $objtype == 'blob'}
  36. <td class="monospace"><a href="{geturl project=$project action=blob hash=$object}" class="list">{$object->GetHash()}</a></td>
  37. <td class="link"><a href="{geturl project=$project action=blob hash=$object}">{t}blob{/t}</a></td>
  38. {/if}
  39. </tr>
  40. {if $tag->GetTagger()}
  41. <tr>
  42. <td>{t}author{/t}</td>
  43. <td>{$tag->GetTagger()}</td>
  44. </tr>
  45. <tr>
  46. <td></td>
  47. <td> <time datetime="{$tag->GetTaggerEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}">{$tag->GetTaggerEpoch()|date_format:"%a, %d %b %Y %H:%M:%S %z"}</time>
  48. {assign var=hourlocal value=$tag->GetTaggerLocalEpoch()|date_format:"%H"}
  49. {if $hourlocal < 6}
  50. (<time datetime="{$tag->GetTaggerLocalEpoch()|date_format:"%Y-%m-%dT%H:%M:%S"}{$tag->GetTaggerTimezone(true)}"><span class="latenight">{$tag->GetTaggerLocalEpoch()|date_format:"%R"}</span> {$tag->GetTaggerTimezone()}</time>)
  51. {else}
  52. (<time datetime="{$tag->GetTaggerLocalEpoch()|date_format:"%Y-%m-%dT%H:%M:%S"}{$tag->GetTaggerTimezone(true)}">{$tag->GetTaggerLocalEpoch()|date_format:"%R"} {$tag->GetTaggerTimezone()}</time>)
  53. {/if}
  54. </td>
  55. </tr>
  56. {/if}
  57. </table>
  58. </div>
  59. <div class="page_body">
  60. {assign var=bugpattern value=$project->GetBugPattern()}
  61. {assign var=bugurl value=$project->GetBugUrl()}
  62. {foreach from=$tag->GetComment() item=line}
  63. {if strncasecmp(trim($line),'-----BEGIN PGP',14) == 0}
  64. <span class="pgpSig">
  65. {/if}
  66. {$line|htmlspecialchars|buglink:$bugpattern:$bugurl}<br />
  67. {if strncasecmp(trim($line),'-----END PGP',12) == 0}
  68. </span>
  69. {/if}
  70. {/foreach}
  71. </div>
  72. {/block}