diff --git a/app/controllers/feeds_controller.rb b/app/controllers/feeds_controller.rb index bf03acbc..aaba4ac5 100644 --- a/app/controllers/feeds_controller.rb +++ b/app/controllers/feeds_controller.rb @@ -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 diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 70b9b407..582ff336 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -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 diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 2eac2268..7b1c398d 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -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 diff --git a/app/views/feeds/history.rxml b/app/views/feeds/history.rxml index b7e5a350..9894412c 100644 --- a/app/views/feeds/history.rxml +++ b/app/views/feeds/history.rxml @@ -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 diff --git a/app/views/feeds/issues.rxml b/app/views/feeds/issues.rxml index fb120b7c..70398f42 100644 --- a/app/views/feeds/issues.rxml +++ b/app/views/feeds/issues.rxml @@ -17,4 +17,4 @@ xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do end end end -end \ No newline at end of file +end diff --git a/app/views/projects/show.rhtml b/app/views/projects/show.rhtml index 354568f9..9419fb2a 100644 --- a/app/views/projects/show.rhtml +++ b/app/views/projects/show.rhtml @@ -56,4 +56,15 @@

<%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %>

<% end %> - \ No newline at end of file + + +<% 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 %> diff --git a/app/views/welcome/index.rhtml b/app/views/welcome/index.rhtml index 9c73ab86..b91efec2 100644 --- a/app/views/welcome/index.rhtml +++ b/app/views/welcome/index.rhtml @@ -23,5 +23,6 @@ <% content_for :header_tags do %> -<%= auto_discovery_link_tag(:rss, {:controller => 'feeds' , :action => 'news' }) %> -<% end %> \ No newline at end of file +<%= 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 %>