]> git.openstreetmap.org Git - rails.git/blob - app/views/diary_entries/rss.rss.builder
Use svg icons in pagination for note lists
[rails.git] / app / views / diary_entries / rss.rss.builder
1 xml.instruct!
2
3 xml.rss("version" => "2.0",
4         "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
5         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
6         "xmlns:georss" => "http://www.georss.org/georss") do
7   xml.channel do
8     xml.title @title
9     xml.description @description
10     xml.link url_for(:action => "index", :only_path => false)
11     xml.image do
12       xml.url image_url("mag_map-rss2.0.png")
13       xml.title @title
14       xml.width "100"
15       xml.height "100"
16       xml.link url_for(:action => "index", :only_path => false)
17     end
18
19     @entries.each do |entry|
20       xml.item do
21         xml.title entry.title
22         xml.link diary_entry_url(entry.user, entry, :only_path => false)
23         xml.guid diary_entry_url(entry.user, entry, :only_path => false)
24         xml.description entry.body.to_html
25         xml.dc :creator, entry.user.display_name
26         xml.pubDate entry.created_at.to_fs(:rfc822)
27         xml.comments diary_entry_url(entry.user, entry, :anchor => "comments", :only_path => false)
28
29         if entry.latitude && entry.longitude
30           xml.geo :lat, entry.latitude.to_s
31           xml.geo :long, entry.longitude.to_s
32           xml.georss :point, "#{entry.latitude} #{entry.longitude}"
33         end
34       end
35     end
36   end
37 end