Project

General

Profile

Feature #14309 ยป add-favicon-to-atom-feeds.patch

Harry Garrood, 2013-06-18 18:16

View differences:

app/helpers/application_helper.rb (working copy)
end
def favicon
"<link rel='shortcut icon' href='#{image_path('/favicon.ico')}' />".html_safe
"<link rel='shortcut icon' href='#{favicon_path}' />".html_safe
end
def favicon_path
image_path('/favicon.ico')
end
def robot_exclusion_tag
'<meta name="robots" content="noindex,follow,noarchive" />'.html_safe
end
app/views/common/feed.atom.builder (working copy)
xml.title truncate_single_line(@title, :length => 100)
xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false))
xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
xml.id url_for(:controller => 'welcome', :only_path => false)
app_base_uri = url_for(:controller => 'welcome', :only_path => false, :trailing_slash => true)
xml.icon app_base_uri + (favicon_path.start_with?('/') ? favicon_path[1..-1] : favicon_path)
xml.id app_base_uri
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
xml.author { xml.name "#{Setting.app_title}" }
xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
    (1-1/1)