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
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 ]
: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
[ <%= @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 %>