1 # frozen_string_literal: true
5 xml.rss("version" => "2.0",
6 "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
7 "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
8 "xmlns:georss" => "http://www.georss.org/georss") do
10 xml.title t("api.notes.rss.title")
11 if @min_lat.nil? && @min_lon.nil? && @max_lat.nil? && @max_lon.nil?
12 xml.description t("api.notes.rss.description_all")
14 xml.description t("api.notes.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon)
16 xml.link url_for(:controller => "/site", :action => "index", :only_path => false)
18 @comments.each do |comment|
19 location = describe_location(comment.note.lat, comment.note.lon, 14, locale)
22 xml.title t("api.notes.rss.#{comment.event}", :place => location)
24 xml.link url_for(:controller => "/notes", :action => "show", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
25 xml.guid url_for(:controller => "/notes", :action => "show", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
28 xml.cdata! render(:partial => "entry", :object => comment, :formats => [:html])
31 xml.dc :creator, comment.author.display_name if comment.author
33 xml.pubDate comment.created_at.to_fs(:rfc822)
34 xml.geo :lat, comment.note.lat
35 xml.geo :long, comment.note.lon
36 xml.georss :point, "#{comment.note.lat} #{comment.note.lon}"