]> git.openstreetmap.org Git - rails.git/blob - app/views/diary_entry/rss.rxml
First stage of i18n. Some migrations and extra plugins.
[rails.git] / app / views / diary_entry / rss.rxml
1 xml.instruct!
2
3 xml.rss("version" => "2.0", 
4         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
5         "xmlns:georss" => "http://www.georss.org/georss") do
6   xml.channel do
7     xml.title @title
8     xml.description @description
9     xml.link url_for(:action => "list", :only_path => false)
10     xml.image do
11       xml.url "http://www.openstreetmap.org/images/mag_map-rss2.0.png"
12       xml.title "OpenStreetMap"
13       xml.width "100"
14       xml.height "100"
15       xml.link url_for(:action => "list", :only_path => false)
16     end
17
18     for entry in @entries
19       xml.item do
20         xml.title h(entry.title)
21         xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :only_path => false)
22         xml.guid url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :only_path => false)
23         xml.description htmlize(entry.body)
24         xml.author entry.user.display_name
25         xml.pubDate entry.created_at.to_s(:rfc822)
26         xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :only_path => false)
27         
28         if entry.latitude and entry.longitude
29           xml.geo :lat, entry.latitude.to_s
30           xml.geo :long, entry.longitude.to_s
31           xml.georss :point, "#{entry.latitude.to_s} #{entry.longitude.to_s}"
32         end
33       end
34     end
35   end
36 end