]> git.openstreetmap.org Git - rails.git/blob - app/views/map_bugs/get_bugs.rss.builder
Merge branch 'master' into openstreetbugs
[rails.git] / app / views / map_bugs / get_bugs.rss.builder
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 "OpenStreetBugs"
8     xml.description t('bugs.rss.description_area', :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon )
9     xml.link url_for(:controller => "site", :action => "index", :only_path => false)
10
11         for bug in @bugs
12       xml.item do
13                 if bug.status == "closed"
14                         xml.title t('bugs.rss.closed', :place => bug.nearby_place)      
15                 else if bug.map_bug_comment.length > 1
16                         xml.title t('bugs.rss.comment', :place => bug.nearby_place)
17                 else
18                         xml.title t('bugs.rss.new', :place => bug.nearby_place)
19                 end     end
20         
21         xml.link url_for(:controller => "browse", :action => "bug", :id => bug.id, :only_path => false)
22                 xml.guid url_for(:controller => "browse", :action => "bug", :id => bug.id, :only_path => false)
23         xml.description  htmlize(bug.flatten_comment("<br><br>"))
24                 if (!bug.map_bug_comment.empty?)
25                 xml.author bug.map_bug_comment[-1].commenter_name
26                 end
27         xml.pubDate bug.last_changed.to_s(:rfc822)
28           xml.geo :lat, bug.lat
29           xml.geo :long, bug.lon
30           xml.georss :point, "#{bug.lat} #{bug.lon}"
31       end
32         end
33   end
34 end