diff options
| author | hukl <contact@smyck.org> | 2009-11-08 18:58:56 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-11-08 18:58:56 +0100 |
| commit | bc2908b802f911b44884f3de01369d298554cbb7 (patch) | |
| tree | dfa27aa0bb14be810eb585bbee298c24f4dfdb14 /app/views | |
| parent | 41fbeb4a740bfe9e35130bc1c9f4d7e4198fe6cf (diff) | |
changes for atom feed - hope that helps
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/layouts/application.html.erb | 2 | ||||
| -rw-r--r-- | app/views/rss/updates.xml.builder | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index c7704ac..cc4c01b 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | <%= stylesheet_link_tag "shadowbox" %> | 12 | <%= stylesheet_link_tag "shadowbox" %> |
| 13 | <%= javascript_include_tag 'public' %> | 13 | <%= javascript_include_tag 'public' %> |
| 14 | 14 | ||
| 15 | <%= auto_discovery_link_tag(:rss, {:controller => "rss", :action => "updates"}) %> | 15 | <%= auto_discovery_link_tag(:atom, {:controller => "rss", :action => "updates"}) %> |
| 16 | </head> | 16 | </head> |
| 17 | 17 | ||
| 18 | <body> | 18 | <body> |
diff --git a/app/views/rss/updates.xml.builder b/app/views/rss/updates.xml.builder index 6be49e9..2461099 100644 --- a/app/views/rss/updates.xml.builder +++ b/app/views/rss/updates.xml.builder | |||
| @@ -3,21 +3,22 @@ xml.instruct! | |||
| 3 | xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do | 3 | xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do |
| 4 | xml.title("Chaos Computer Club Updates") | 4 | xml.title("Chaos Computer Club Updates") |
| 5 | xml.link(:href => "http://www.ccc.de/") | 5 | xml.link(:href => "http://www.ccc.de/") |
| 6 | xml.link(:rel => "self", :href => "/rss/updates.xml") | 6 | xml.link(:rel => "self", :href => "#{@host}/rss/updates") |
| 7 | xml.updated(@items.first.published_at.xmlschema) | 7 | xml.updated(@items.first.published_at.xmlschema) |
| 8 | xml.author do | 8 | xml.author do |
| 9 | xml.name("Chaos Computer Club e.V.") | 9 | xml.name("Chaos Computer Club e.V.") |
| 10 | end | 10 | end |
| 11 | xml.id("http://www.ccc.de/") | 11 | xml.id("#{@host}/rss/updates") |
| 12 | 12 | ||
| 13 | @items.each do |item| | 13 | @items.each do |item| |
| 14 | xml.entry do | 14 | xml.entry do |
| 15 | xml.title(item.title) | 15 | xml.title(item.title) |
| 16 | xml.link( | 16 | xml.link( |
| 17 | :href => content_path_helper(item.node.unique_path), | 17 | :href => "#{@host}/de/#{item.node.unique_name}", |
| 18 | :rel => "alternate" | 18 | :rel => "alternate", |
| 19 | :type => "text/html" | ||
| 19 | ) | 20 | ) |
| 20 | xml.id(content_url_helper(item.node.unique_path)) | 21 | xml.id(item.node.id) |
| 21 | xml.updated(item.published_at.xmlschema) | 22 | xml.updated(item.published_at.xmlschema) |
| 22 | xml.content(:type => "xhtml") do | 23 | xml.content(:type => "xhtml") do |
| 23 | xml.div(item.body, :xmlns => "http://www.w3.org/1999/xhtml") | 24 | xml.div(item.body, :xmlns => "http://www.w3.org/1999/xhtml") |
