annotate 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
rev   line source
Chris@0 1 <% content_for :header_tags do %>
Chris@0 2 <%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
Chris@0 3 <% end %>
Chris@0 4
Chris@0 5 <div class="contextual">
chris@22 6 <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') + ' |' if User.current.allowed_to?(:add_project, nil, :global => true) %>
Chris@0 7 <%= link_to(l(:label_issue_view_all), { :controller => 'issues' }) + ' |' if User.current.allowed_to?(:view_issues, nil, :global => true) %>
Chris@0 8 <%= link_to(l(:label_overall_spent_time), { :controller => 'time_entries' }) + ' |' if User.current.allowed_to?(:view_time_entries, nil, :global => true) %>
chris@22 9 <%= link_to l(:label_overall_activity), { :controller => 'activities', :action => 'index' }%>
Chris@0 10 </div>
Chris@0 11
luisf@69 12 <% if User.current.logged? %>
luisf@69 13
luisf@69 14 <%= render_my_project_hierarchy(@projects)%>
Chris@0 15
luisf@69 16 <h2><%=l(:label_other_project_plural)%></h2>
luisf@69 17 <%= render_other_project_hierarchy(@projects)%>
luisf@68 18
luisf@69 19 <% else %>
luisf@69 20
luisf@69 21 <h2><%=l(:label_project_plural)%></h2>
luisf@69 22 <%= render_project_hierarchy(@projects)%>
luisf@69 23 <% end %>
luisf@69 24
luisf@69 25
Chris@0 26
Chris@0 27 <% if User.current.logged? %>
Chris@0 28 <p style="text-align:right;">
Chris@0 29 <span class="my-project"><%= l(:label_my_projects) %></span>
Chris@0 30 </p>
Chris@0 31 <% end %>
Chris@0 32
luisf@68 33
Chris@0 34 <% other_formats_links do |f| %>
Chris@0 35 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
Chris@0 36 <% end %>
Chris@0 37
Chris@0 38 <% html_title(l(:label_project_plural)) -%>