graph.tpl 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {*
  2. * Graph selection template
  3. *
  4. * @author Christopher Han <xiphux@gmail.com>
  5. * @copyright Copyright (c) 2012 Christopher Han
  6. * @package GitPHP
  7. * @subpackage Template
  8. *}
  9. {extends file='projectbase.tpl'}
  10. {block name=javascript}
  11. {if $graphtype=='languagedist'}
  12. require.deps = ['languagedist'];
  13. {if file_exists('js/languagedist.min.js')}
  14. require.paths.languagedist = "languagedist.min";
  15. {/if}
  16. {elseif $graphtype=='commitactivity'}
  17. require.deps = ['commitactivity'];
  18. {if file_exists('js/commitactivity.min.js')}
  19. require.paths.commitactivity = "commitactivity.min";
  20. {/if}
  21. {/if}
  22. {/block}
  23. {block name=main}
  24. <div class="page_nav">
  25. {include file='nav.tpl' commit=$head current='graph'}
  26. <br />
  27. <br />
  28. {if $graphtype=='commitactivity'}
  29. {t}commit activity{/t}
  30. {else}
  31. <a href="{geturl project=$project action=graph graphtype=commitactivity}">{t}commit activity{/t}</a>
  32. {/if}
  33. |
  34. {if $graphtype=='languagedist'}
  35. {t}language distribution{/t}
  36. {else}
  37. <a href="{geturl project=$project action=graph graphtype=languagedist}">{t}language distribution{/t}</a>
  38. {/if}
  39. </div>
  40. {include file='title.tpl'}
  41. <div id="graph">
  42. </div>
  43. {/block}