atom.tpl 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {*
  2. * atom.tpl
  3. * gitphp: A PHP git repository browser
  4. * Component: Atom feed template
  5. *
  6. * Copyright (C) 2010 Christian Weiske <cweiske@cweiske.de>
  7. *}
  8. <?xml version="1.0" encoding="utf-8"?>
  9. <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  10. <title>{$project->GetProject()}</title>
  11. <subtitle type="text">{$project->GetProject()} log</subtitle>
  12. <link href="{geturl fullurl=true project=$project}"/>
  13. <link rel="self" href="{geturl fullurl=true project=$project action=atom}"/>
  14. <id>{geturl fullurl=true project=$project}</id>
  15. {if $log->GetHead()}
  16. <updated>{$log->GetHead()->GetCommitterEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}</updated>
  17. {/if}
  18. {foreach from=$log item=logitem}
  19. <entry>
  20. <id>{geturl fullurl=true project=$project action=commit hash=$logitem}</id>
  21. <title>{$logitem->GetTitle()|escape:'html'}</title>
  22. <author>
  23. <name>{$logitem->GetAuthorName()|escape:'html'}</name>
  24. </author>
  25. <published>{$logitem->GetCommitterEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}</published>
  26. <updated>{$logitem->GetCommitterEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}</updated>
  27. <link rel="alternate" href="{geturl fullurl=true project=$project action=commit hash=$logitem}"/>
  28. <summary>{$logitem->GetTitle()|escape:'html'}</summary>
  29. <content type="xhtml">
  30. <div xmlns="http://www.w3.org/1999/xhtml">
  31. <p>
  32. {foreach from=$logitem->GetComment() item=line}
  33. {$line|htmlspecialchars}<br />
  34. {/foreach}
  35. </p>
  36. <ul>
  37. {foreach from=$logitem->DiffToParent($gitexe) item=diffline}
  38. <li>{$diffline->GetToFile()|htmlspecialchars}</li>
  39. {/foreach}
  40. </ul>
  41. </div>
  42. </content>
  43. </entry>
  44. {/foreach}
  45. </feed>