Added atom feed on the new cross-project issue list.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@686 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
6bdc13b33d
commit
c68dac7e9a
|
@ -135,8 +135,9 @@ class ApplicationController < ActionController::Base
|
|||
return false
|
||||
end
|
||||
|
||||
def render_feed(items, options={})
|
||||
@items = items.sort {|x,y| y.event_datetime <=> x.event_datetime }
|
||||
def render_feed(items, options={})
|
||||
@items = items || []
|
||||
@items.sort! {|x,y| y.event_datetime <=> x.event_datetime }
|
||||
@title = options[:title] || Setting.app_title
|
||||
render :template => "common/feed.atom.rxml", :layout => false, :content_type => 'application/atom+xml'
|
||||
end
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
class IssuesController < ApplicationController
|
||||
layout 'base', :except => :export_pdf
|
||||
before_filter :find_project, :authorize, :except => :index
|
||||
accept_key_auth :index
|
||||
|
||||
cache_sweeper :issue_sweeper, :only => [ :edit, :change_status, :destroy ]
|
||||
|
||||
|
@ -50,7 +51,10 @@ class IssuesController < ApplicationController
|
|||
:limit => @issue_pages.items_per_page,
|
||||
:offset => @issue_pages.current.offset
|
||||
end
|
||||
render :layout => false if request.xhr?
|
||||
respond_to do |format|
|
||||
format.html { render :layout => false if request.xhr? }
|
||||
format.atom { render_feed(@issues, :title => l(:label_issue_plural)) }
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
@ -53,3 +53,7 @@
|
|||
[ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ]</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue