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
<% 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)) -%>