summaryrefslogtreecommitdiff
path: root/app/views/rss
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/rss')
-rw-r--r--app/views/rss/tag_updates.xml.builder27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/views/rss/tag_updates.xml.builder b/app/views/rss/tag_updates.xml.builder
new file mode 100644
index 0000000..6491cfc
--- /dev/null
+++ b/app/views/rss/tag_updates.xml.builder
@@ -0,0 +1,27 @@
1xml.instruct!
2
3xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do
4 xml.title("Chaos Computer Club: #{@tag}")
5 xml.link(:href => "#{@host}/")
6 xml.link(:rel => "self", :href => "#{@host}/rss/tags/#{@tag}/updates.xml")
7 xml.updated(@items.first.published_at.xmlschema) unless @items.empty?
8 xml.author do
9 xml.name("Chaos Computer Club e. V.")
10 end
11 xml.id("#{@host}/rss/tags/#{@tag}/updates")
12
13 @items.each do |item|
14 xml.entry do
15 xml.title(CGI.escapeHTML(item.title.to_s))
16 xml.link(
17 :href => content_url(:page_path => item.node.unique_path),
18 :rel => "alternate",
19 :type => "text/html"
20 )
21 xml.id(content_url(:page_path => item.node.feed_id))
22 xml.updated(item.updated_at.xmlschema)
23 xml.published(item.published_at.xmlschema)
24 xml.summary(CGI.escapeHTML(item.abstract.to_s))
25 end
26 end
27end