@@ -69,7 +69,7 class FeedsController < ApplicationController | |||||
69 | :order => "#{Journal.table_name}.created_on DESC" |
|
69 | :order => "#{Journal.table_name}.created_on DESC" | |
70 | end |
|
70 | end | |
71 |
|
71 | |||
72 |
@title = (@project ? @project.name : Setting.app_title) + ": " + (query ? query.name : l(:label_ |
|
72 | @title = (@project ? @project.name : Setting.app_title) + ": " + (query ? query.name : l(:label_changes_details)) | |
73 | headers["Content-Type"] = "application/rss+xml" |
|
73 | headers["Content-Type"] = "application/rss+xml" | |
74 | render :action => 'history_atom' if 'atom' == params[:format] |
|
74 | render :action => 'history_atom' if 'atom' == params[:format] | |
75 | end |
|
75 | end |
@@ -95,6 +95,8 class ProjectsController < ApplicationController | |||||
95 | @trackers = Tracker.find(:all, :order => 'position') |
|
95 | @trackers = Tracker.find(:all, :order => 'position') | |
96 | @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]) |
|
96 | @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]) | |
97 | @total_issues_by_tracker = Issue.count(:group => :tracker, :conditions => ["project_id=?", @project.id]) |
|
97 | @total_issues_by_tracker = Issue.count(:group => :tracker, :conditions => ["project_id=?", @project.id]) | |
|
98 | ||||
|
99 | @key = logged_in_user.get_or_create_rss_key.value if logged_in_user | |||
98 | end |
|
100 | end | |
99 |
|
101 | |||
100 | def settings |
|
102 | def settings |
@@ -21,5 +21,7 class WelcomeController < ApplicationController | |||||
21 | def index |
|
21 | def index | |
22 | @news = News.latest logged_in_user |
|
22 | @news = News.latest logged_in_user | |
23 | @projects = Project.latest logged_in_user |
|
23 | @projects = Project.latest logged_in_user | |
|
24 | ||||
|
25 | @key = logged_in_user.get_or_create_rss_key.value if logged_in_user | |||
24 | end |
|
26 | end | |
25 | end |
|
27 | end |
@@ -4,7 +4,7 xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do | |||||
4 | xml.title @title |
|
4 | xml.title @title | |
5 | xml.link url_for(:controller => 'welcome', :only_path => false) |
|
5 | xml.link url_for(:controller => 'welcome', :only_path => false) | |
6 | xml.pubDate CGI.rfc1123_date(@journals.first ? @journals.first.created_on : Time.now) |
|
6 | xml.pubDate CGI.rfc1123_date(@journals.first ? @journals.first.created_on : Time.now) | |
7 |
xml.description l(:label_ |
|
7 | xml.description l(:label_changes_details) | |
8 | @journals.each do |journal| |
|
8 | @journals.each do |journal| | |
9 | issue = journal.issue |
|
9 | issue = journal.issue | |
10 | xml.item do |
|
10 | xml.item do |
@@ -17,4 +17,4 xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do | |||||
17 | end |
|
17 | end | |
18 | end |
|
18 | end | |
19 | end |
|
19 | end | |
20 | end No newline at end of file |
|
20 | end |
@@ -56,4 +56,15 | |||||
56 | <p class="textcenter"><small><%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %></small></p> |
|
56 | <p class="textcenter"><small><%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %></small></p> | |
57 | </div> |
|
57 | </div> | |
58 | <% end %> |
|
58 | <% end %> | |
59 | </div> No newline at end of file |
|
59 | </div> | |
|
60 | ||||
|
61 | <% content_for :header_tags do %> | |||
|
62 | <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key}, {:title => l(:label_reported_issues)}) %> | |||
|
63 | <%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_reported_issues)}) %> | |||
|
64 | ||||
|
65 | <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key }, {:title => l(:label_changes_details)}) %> | |||
|
66 | <%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_changes_details)}) %> | |||
|
67 | ||||
|
68 | <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key}, {:title => l(:label_news_latest)}) %> | |||
|
69 | <%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_news_latest)}) %> | |||
|
70 | <% end %> |
@@ -23,5 +23,6 | |||||
23 | </div> |
|
23 | </div> | |
24 |
|
24 | |||
25 | <% content_for :header_tags do %> |
|
25 | <% content_for :header_tags do %> | |
26 |
<%= auto_discovery_link_tag(:rss, {:controller => 'feeds' |
|
26 | <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'news', :key => @key}, {:title => l(:label_news_latest)}) %> | |
27 | <% end %> No newline at end of file |
|
27 | <%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'news', :key => @key, :format => 'atom'}, {:title => l(:label_news_latest)}) %> | |
|
28 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now