diff app/views/projects/index.rhtml @ 69:dc22c3eb3c81 luisf

Feature #35: - Does not show the label "My Projects" if the user does not have any projects. - If the user is not signed in only shows the default Projects list.
author luisf
date Mon, 06 Dec 2010 18:12:52 +0000
parents 60c0a4e08e09
children 1412841d48a3
line wrap: on
line diff
--- a/app/views/projects/index.rhtml	Mon Dec 06 17:50:43 2010 +0000
+++ b/app/views/projects/index.rhtml	Mon Dec 06 18:12:52 2010 +0000
@@ -9,12 +9,20 @@
     <%= link_to l(:label_overall_activity), { :controller => 'activities', :action => 'index' }%>
 </div>
 
-<h2><%=l(:label_my_project_plural)%></h2>
-<%= render_my_project_hierarchy(@projects)%>
+<% if User.current.logged? %>
+  
+  <%= render_my_project_hierarchy(@projects)%>
 
+  <h2><%=l(:label_other_project_plural)%></h2>
+  <%= render_other_project_hierarchy(@projects)%>
 
-<h2><%=l(:label_other_project_plural)%></h2>
-<%= render_other_project_hierarchy(@projects)%>
+<% else %>
+
+  <h2><%=l(:label_project_plural)%></h2>
+  <%= render_project_hierarchy(@projects)%>
+<% end %>
+
+
 
 <% if User.current.logged? %>
 <p style="text-align:right;">
@@ -23,12 +31,6 @@
 <% end %>
 
 
-
-
-
-
-
-
 <% other_formats_links do |f| %>
 	<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
 <% end %>