diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 320def41..d15c6bc2 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -49,8 +49,16 @@ class ProjectsController < ApplicationController projects = Project.find :all, :conditions => Project.visible_by(User.current), :include => :parent - @project_tree = projects.group_by {|p| p.parent || p} - @project_tree.each_key {|p| @project_tree[p] -= [p]} + 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 diff --git a/app/views/projects/index.rhtml b/app/views/projects/index.rhtml index b8bb62eb..e12b0597 100644 --- a/app/views/projects/index.rhtml +++ b/app/views/projects/index.rhtml @@ -17,9 +17,14 @@ <% end %> <% if User.current.logged? %> -
+

<%= l(:label_my_projects) %> -

+

<% end %> +

+<%= l(:label_export_to) %> +<%= link_to 'Atom', {:format => 'atom', :key => User.current.rss_key}, :class => 'feed' %> +

+ <% html_title(l(:label_project_plural)) -%>