@@ -49,8 +49,16 class ProjectsController < ApplicationController | |||||
49 | projects = Project.find :all, |
|
49 | projects = Project.find :all, | |
50 | :conditions => Project.visible_by(User.current), |
|
50 | :conditions => Project.visible_by(User.current), | |
51 | :include => :parent |
|
51 | :include => :parent | |
52 | @project_tree = projects.group_by {|p| p.parent || p} |
|
52 | respond_to do |format| | |
53 | @project_tree.each_key {|p| @project_tree[p] -= [p]} |
|
53 | format.html { | |
|
54 | @project_tree = projects.group_by {|p| p.parent || p} | |||
|
55 | @project_tree.each_key {|p| @project_tree[p] -= [p]} | |||
|
56 | } | |||
|
57 | format.atom { | |||
|
58 | render_feed(projects.sort_by(&:created_on).reverse.slice(0, Setting.feeds_limit.to_i), | |||
|
59 | :title => "#{Setting.app_title}: #{l(:label_project_latest)}") | |||
|
60 | } | |||
|
61 | end | |||
54 | end |
|
62 | end | |
55 |
|
63 | |||
56 | # Add a new project |
|
64 | # Add a new project |
@@ -17,9 +17,14 | |||||
17 | <% end %> |
|
17 | <% end %> | |
18 |
|
18 | |||
19 | <% if User.current.logged? %> |
|
19 | <% if User.current.logged? %> | |
20 | <div class="contextual"> |
|
20 | <p style="text-align:right;"> | |
21 | <span class="icon icon-fav"><%= l(:label_my_projects) %></span> |
|
21 | <span class="icon icon-fav"><%= l(:label_my_projects) %></span> | |
22 |
</ |
|
22 | </p> | |
23 | <% end %> |
|
23 | <% end %> | |
24 |
|
24 | |||
|
25 | <p class="other-formats"> | |||
|
26 | <%= l(:label_export_to) %> | |||
|
27 | <span><%= link_to 'Atom', {:format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span> | |||
|
28 | </p> | |||
|
29 | ||||
25 | <% html_title(l(:label_project_plural)) -%> |
|
30 | <% html_title(l(:label_project_plural)) -%> |
General Comments 0
You need to be logged in to leave comments.
Login now