title.tpl 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {*
  2. * Title
  3. *
  4. * Title template
  5. *
  6. * @author Christopher Han <xiphux@gmail.com>
  7. * @copyright Copyright (c) 2010 Christopher Han
  8. * @package GitPHP
  9. * @subpackage Template
  10. *}
  11. <div class="title">
  12. {if $titlecommit}
  13. {if $target == 'commitdiff'}
  14. <a href="{geturl project=$project action=commitdiff hash=$titlecommit}" class="title">{$titlecommit->GetTitle()|escape}</a>
  15. {elseif $target == 'tree'}
  16. <a href="{geturl project=$project action=tree hash=$titletree hashbase=$titlecommit}" class="title">{$titlecommit->GetTitle()|escape}</a>
  17. {else}
  18. <a href="{geturl project=$project action=commit hash=$titlecommit}" class="title">{$titlecommit->GetTitle()|escape}</a>
  19. {/if}
  20. {include file='refbadges.tpl' commit=$titlecommit}
  21. {else}
  22. {if $target == 'summary'}
  23. <a href="{geturl project=$project}" class="title">&nbsp;</a>
  24. {elseif $target == 'shortlog'}
  25. {if $disablelink}
  26. {t}shortlog{/t}
  27. {else}
  28. <a href="{geturl project=$project action=shortlog}" class="title">{t}shortlog{/t}</a>
  29. {/if}
  30. {elseif $target == 'tags'}
  31. {if $disablelink}
  32. {t}tags{/t}
  33. {else}
  34. <a href="{geturl project=$project action=tags}" class="title">{t}tags{/t}</a>
  35. {/if}
  36. {elseif $target == 'heads'}
  37. {if $disablelink}
  38. {t}heads{/t}
  39. {else}
  40. <a href="{geturl project=$project action=heads}" class="title">{t}heads{/t}</a>
  41. {/if}
  42. {else}
  43. &nbsp;
  44. {/if}
  45. {/if}
  46. </div>