Adds new projects atom feed (#1290).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1465 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
744d866926
commit
eb0e218603
|
@ -49,8 +49,16 @@ class ProjectsController < ApplicationController
|
|||
projects = Project.find :all,
|
||||
:conditions => Project.visible_by(User.current),
|
||||
:include => :parent
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
@project_tree = projects.group_by {|p| p.parent || p}
|
||||
@project_tree.each_key {|p| @project_tree[p] -= [p]}
|
||||
}
|
||||
format.atom {
|
||||
render_feed(projects.sort_by(&:created_on).reverse.slice(0, Setting.feeds_limit.to_i),
|
||||
:title => "#{Setting.app_title}: #{l(:label_project_latest)}")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
# Add a new project
|
||||
|
|
|
@ -17,9 +17,14 @@
|
|||
<% end %>
|
||||
|
||||
<% if User.current.logged? %>
|
||||
<div class="contextual">
|
||||
<p style="text-align:right;">
|
||||
<span class="icon icon-fav"><%= l(:label_my_projects) %></span>
|
||||
</div>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<p class="other-formats">
|
||||
<%= l(:label_export_to) %>
|
||||
<span><%= link_to 'Atom', {:format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
|
||||
</p>
|
||||
|
||||
<% html_title(l(:label_project_plural)) -%>
|
||||
|
|
Loading…
Reference in New Issue