filediff.tpl 549 B

1234567891011121314151617181920
  1. {*
  2. * filediff.tpl
  3. * gitphp: A PHP git repository browser
  4. * Component: Single file diff template
  5. *
  6. * Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
  7. *}
  8. <pre>
  9. {foreach from=$diff item=diffline}
  10. {if substr($diffline,0,1)=="+"}
  11. <span class="diffplus">{$diffline|escape:'html'}</span>
  12. {elseif substr($diffline,0,1)=="-"}
  13. <span class="diffminus">{$diffline|escape:'html'}</span>
  14. {elseif substr($diffline,0,1)=="@"}
  15. <span class="diffat">{$diffline|escape:'html'}</span>
  16. {else}
  17. <span>{$diffline|escape:'html'}</span>
  18. {/if}
  19. {/foreach}
  20. </pre>