blame.tpl 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {*
  2. * blame.tpl
  3. * gitphp: A PHP git repository browser
  4. * Component: Blame view template
  5. *
  6. * Copyright (C) 2010 Christopher Han <xiphux@gmail.com>
  7. *}
  8. {extends file='projectbase.tpl'}
  9. {block name=css}
  10. {if $geshicss}
  11. <style type="text/css">
  12. {$geshicss}
  13. </style>
  14. {/if}
  15. {/block}
  16. {block name=main}
  17. <div class="page_nav">
  18. {include file='nav.tpl' treecommit=$commit}
  19. <br />
  20. <a href="{geturl project=$project action=blob hash=$blob file=$blob->GetPath() output=plain}">{t}plain{/t}</a> |
  21. {if $commit->GetHash() != $head->GetHash()}
  22. <a href="{geturl project=$project action=blame hashbase=HEAD file=$blob->GetPath()}">{t}HEAD{/t}</a>
  23. {else}
  24. {t}HEAD{/t}
  25. {/if}
  26. | blame
  27. <br />
  28. </div>
  29. {include file='title.tpl' titlecommit=$commit}
  30. {include file='path.tpl' pathobject=$blob target='blob'}
  31. <div class="page_body">
  32. {if $geshi}
  33. {$geshihead}
  34. <td class="ln de1" id="blameData">
  35. {include file='blamedata.tpl'}
  36. </td>
  37. {$geshibody}
  38. {$geshifoot}
  39. {else}
  40. <table class="code">
  41. {foreach from=$blob->GetData(true) item=blobline name=blob}
  42. {assign var=blamecommit value=$blame[$smarty.foreach.blob.iteration]}
  43. {if $blamecommit}
  44. {cycle values="light,dark" assign=rowclass}
  45. {/if}
  46. <tr class="{$rowclass}">
  47. <td class="date">
  48. {if $blamecommit}
  49. <a href="{geturl project=$project action=commit hash=$blamecommit}" title="{$blamecommit->GetTitle()|escape}" class="commitTip"><time datetime="{$blamecommit->GetAuthorEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}">{$blamecommit->GetAuthorEpoch()|date_format:"%Y-%m-%d %H:%M:%S"}</time></a>
  50. {/if}
  51. </td>
  52. <td class="author">
  53. {if $blamecommit}
  54. {$blamecommit->GetAuthorName()|escape}
  55. {/if}
  56. </td>
  57. <td class="num"><a id="l{$smarty.foreach.blob.iteration}" href="#l{$smarty.foreach.blob.iteration}" class="linenr">{$smarty.foreach.blob.iteration}</a></td>
  58. <td class="codeline">{$blobline|escape}</td>
  59. </tr>
  60. {/foreach}
  61. </table>
  62. {/if}
  63. </div>
  64. {/block}