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)
1210 1210
  end
1211 1211

  
1212 1212
  def favicon
1213
    "<link rel='shortcut icon' href='#{image_path('/favicon.ico')}' />".html_safe
1213
    "<link rel='shortcut icon' href='#{favicon_path}' />".html_safe
1214 1214
  end
1215 1215

  
1216
  def favicon_path
1217
    image_path('/favicon.ico')
1218
  end
1219

  
1216 1220
  def robot_exclusion_tag
1217 1221
    '<meta name="robots" content="noindex,follow,noarchive" />'.html_safe
1218 1222
  end
app/views/common/feed.atom.builder (working copy)
3 3
  xml.title   truncate_single_line(@title, :length => 100)
4 4
  xml.link    "rel" => "self", "href" => url_for(params.merge(:only_path => false))
5 5
  xml.link    "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
6
  xml.id      url_for(:controller => 'welcome', :only_path => false)
6

  
7
  app_base_uri = url_for(:controller => 'welcome', :only_path => false, :trailing_slash => true)
8
  xml.icon    app_base_uri + (favicon_path.start_with?('/') ? favicon_path[1..-1] : favicon_path)
9
  xml.id      app_base_uri
10

  
7 11
  xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
8 12
  xml.author  { xml.name "#{Setting.app_title}" }
9 13
  xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
    (1-1/1)