Added feeds auto discovery links on projects/show (patch by Nicolas Chuche).
Also fixed 'issue changes details' feed title. git-svn-id: http://redmine.rubyforge.org/svn/trunk@647 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2f0edb0b61
commit
1f991c6a79
|
@ -69,7 +69,7 @@ class FeedsController < ApplicationController
|
|||
:order => "#{Journal.table_name}.created_on DESC"
|
||||
end
|
||||
|
||||
@title = (@project ? @project.name : Setting.app_title) + ": " + (query ? query.name : l(:label_reported_issues))
|
||||
@title = (@project ? @project.name : Setting.app_title) + ": " + (query ? query.name : l(:label_changes_details))
|
||||
headers["Content-Type"] = "application/rss+xml"
|
||||
render :action => 'history_atom' if 'atom' == params[:format]
|
||||
end
|
||||
|
|
|
@ -95,6 +95,8 @@ class ProjectsController < ApplicationController
|
|||
@trackers = Tracker.find(:all, :order => 'position')
|
||||
@open_issues_by_tracker = Issue.count(:group => :tracker, :joins => "INNER JOIN #{IssueStatus.table_name} ON #{IssueStatus.table_name}.id = #{Issue.table_name}.status_id", :conditions => ["project_id=? and #{IssueStatus.table_name}.is_closed=?", @project.id, false])
|
||||
@total_issues_by_tracker = Issue.count(:group => :tracker, :conditions => ["project_id=?", @project.id])
|
||||
|
||||
@key = logged_in_user.get_or_create_rss_key.value if logged_in_user
|
||||
end
|
||||
|
||||
def settings
|
||||
|
|
|
@ -21,5 +21,7 @@ class WelcomeController < ApplicationController
|
|||
def index
|
||||
@news = News.latest logged_in_user
|
||||
@projects = Project.latest logged_in_user
|
||||
|
||||
@key = logged_in_user.get_or_create_rss_key.value if logged_in_user
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
|
|||
xml.title @title
|
||||
xml.link url_for(:controller => 'welcome', :only_path => false)
|
||||
xml.pubDate CGI.rfc1123_date(@journals.first ? @journals.first.created_on : Time.now)
|
||||
xml.description l(:label_reported_issues)
|
||||
xml.description l(:label_changes_details)
|
||||
@journals.each do |journal|
|
||||
issue = journal.issue
|
||||
xml.item do
|
||||
|
|
|
@ -17,4 +17,4 @@ xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -56,4 +56,15 @@
|
|||
<p class="textcenter"><small><%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %></small></p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key}, {:title => l(:label_reported_issues)}) %>
|
||||
<%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_reported_issues)}) %>
|
||||
|
||||
<%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key }, {:title => l(:label_changes_details)}) %>
|
||||
<%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_changes_details)}) %>
|
||||
|
||||
<%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key}, {:title => l(:label_news_latest)}) %>
|
||||
<%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_news_latest)}) %>
|
||||
<% end %>
|
||||
|
|
|
@ -23,5 +23,6 @@
|
|||
</div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:rss, {:controller => 'feeds' , :action => 'news' }) %>
|
||||
<% end %>
|
||||
<%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'news', :key => @key}, {:title => l(:label_news_latest)}) %>
|
||||
<%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'news', :key => @key, :format => 'atom'}, {:title => l(:label_news_latest)}) %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue