aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2012-10-26 07:59:17 +0200
committerChristian Weiske <cweiske@cweiske.de>2012-10-26 07:59:17 +0200
commit8c762aa599e4022654cf707125d7ac2ed6f194b0 (patch)
tree9ff4c80cd0c0e864b3770197e2a3840bcb01ac52 /data
parent7bfe10119a31215f131c64fa57c3ffc10a58c8eb (diff)
downloadphorkie-8c762aa599e4022654cf707125d7ac2ed6f194b0.tar.gz
phorkie-8c762aa599e4022654cf707125d7ac2ed6f194b0.zip
Part of #6: show changed files + line counts in updated feed
Diffstat (limited to 'data')
-rw-r--r--data/templates/feed-updated.htm19
1 files changed, 15 insertions, 4 deletions
diff --git a/data/templates/feed-updated.htm b/data/templates/feed-updated.htm
index 699dabd..ff1d609 100644
--- a/data/templates/feed-updated.htm
+++ b/data/templates/feed-updated.htm
@@ -12,13 +12,24 @@
<id>{{repo.getLink('display', null, true)}}</id>
<title>{{repo.getTitle}}</title>
<published>{{repo.crdate|date('c')}}</published>
- <updated>{{repo.modate|date('c')}}</updated>
+ {% set commit = repo.getHistory().0 %}
+ <updated>{{commit.committerTime|date('c')}}</updated>
<link rel="alternate" type="text/html" href="{{repo.getLink('display', null, true)}}" />
<author>
- {% set owner=repo.getOwner() %}
- <name>{{owner.name}}</name>
- <email>{{owner.email}}</email>
+ <name>{{commit.committerName}}</name>
+ <email>{{commit.committerEmail}}</email>
</author>
+ <summary>{% spaceless %}
+ {% if commit.filesChanged %}
+ {{ntext(commit.filesChanged, "%d file", "%d files")}} changed{% if commit.linesAdded %},{% endif %}
+ {% endif %}
+ {% if commit.linesAdded %}
+ {{ntext(commit.linesAdded, "%d line", "%d lines")}} added{% if commit.linesDeleted %},{% endif %}
+ {% endif %}
+ {% if commit.linesDeleted %}
+ {{ntext(commit.linesDeleted, "%d line", "%d lines")}} deleted
+ {% endif %}
+ {% endspaceless %}</summary>
</entry>
{% endfor %}
</feed> \ No newline at end of file