projectbase.tpl 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. {*
  2. * Projectbase
  3. *
  4. * Base template for all pages for a single project
  5. *
  6. * @author Christopher Han <xiphux@gmail.com>
  7. * @copyright Copyright (c) 2011 Christopher Han
  8. * @packge GitPHP
  9. * @subpackage Template
  10. *}
  11. {extends file='main.tpl'}
  12. {block name=title}
  13. {$pagetitle} :: {$project->GetProject()}{if $actionlocal}/{$actionlocal}{/if}
  14. {/block}
  15. {block name=feeds}
  16. <link rel="alternate" title="{$project->GetProject()|escape} log (Atom)" href="{geturl project=$project action=atom}" type="application/atom+xml" />
  17. <link rel="alternate" title="{$project->GetProject()|escape} log (RSS)" href="{geturl project=$project action=rss}" type="application/rss+xml" />
  18. {/block}
  19. {block name=links}
  20. {if $project->GetCloneUrl()}
  21. <link rel="vcs-git" href="{$project->GetCloneUrl()}" title="{$project->GetDescription()|escape}" />
  22. {/if}
  23. {/block}
  24. {block name=header}
  25. <a href="{geturl}">{if $homelink}{$homelink}{else}{t}projects{/t}{/if}</a> /
  26. <a href="{geturl project=$project}">{$project->GetProject()}</a>
  27. {if $actionlocal}
  28. / {$actionlocal}
  29. {/if}
  30. {if $enablesearch}
  31. <form method="get" action="{geturl project=$project action=search hash=$commit}" enctype="application/x-www-form-urlencoded">
  32. <div class="search">
  33. {if !$router->GetCleanUrl()}
  34. <input type="hidden" name="p" value="{$project->GetProject()}" />
  35. <input type="hidden" name="a" value="search" />
  36. <input type ="hidden" name="h" value="{if $commit}{$commit->GetHash()}{else}HEAD{/if}" />
  37. {/if}
  38. <select name="st">
  39. <option {if $searchtype == 'commit'}selected="selected"{/if} value="commit">{t}commit{/t}</option>
  40. <option {if $searchtype == 'author'}selected="selected"{/if} value="author">{t}author{/t}</option>
  41. <option {if $searchtype == 'committer'}selected="selected"{/if} value="committer">{t}committer{/t}</option>
  42. {if $filesearch}
  43. <option {if $searchtype == 'file'}selected="selected"{/if} value="file">{t}file{/t}</option>
  44. {/if}
  45. </select> {t}search{/t}: <input type="search" name="s" {if $search}value="{$search}"{/if} />
  46. </div>
  47. </form>
  48. {/if}
  49. {/block}
  50. {block name=footer}
  51. <div class="page_footer_text">
  52. {if $project->GetWebsite()}
  53. <a href="{$project->GetWebsite()}">{$project->GetDescription()|escape}</a>
  54. {else}
  55. {$project->GetDescription()|escape}
  56. {/if}
  57. </div>
  58. <a href="{geturl project=$project action=rss}" class="rss_logo">{t}RSS{/t}</a>
  59. <a href="{geturl project=$project action=atom}" class="rss_logo">{t}Atom{/t}</a>
  60. {/block}