* news rss feed added
* "header_tags" block added to allow inclusion of page specific tags in the html header (stylesheets, javascripts, feeds...) git-svn-id: http://redmine.rubyforge.org/svn/trunk@121 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
xml.instruct!
|
||||
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
|
||||
xml.channel do
|
||||
xml.title "#{$RDM_HEADER_TITLE}: #{l(:label_news_latest)}"
|
||||
xml.link url_for(:controller => '', :only_path => false)
|
||||
xml.pubDate CGI.rfc1123_date(@news.first.created_on)
|
||||
xml.description "#{$RDM_HEADER_TITLE}: #{l(:label_news_latest)}"
|
||||
@news.each do |news|
|
||||
xml.item do
|
||||
xml.title "#{news.project.name}: #{news.title}"
|
||||
news_url = url_for(:controller => 'news' , :action => 'show', :id => news, :only_path => false)
|
||||
xml.link news_url
|
||||
xml.description h(news.summary)
|
||||
xml.pubDate CGI.rfc1123_date(news.created_on)
|
||||
xml.guid news_url
|
||||
xml.author h(news.author.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -14,6 +14,8 @@
|
||||
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||||
<%= stylesheet_link_tag 'calendar' %>
|
||||
<%= stylesheet_link_tag 'jstoolbar' %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -21,3 +21,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:rss, {:controller => 'feeds' , :action => 'news' }) %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user