mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-18 23:16:10 +01:00
Now actions in hidden projects are hidden on the home page and context pages. Hidden projects are also listed separately in the sidebar (this should perhaps be included in the user preference for showing completed projects in the sidebar). The counts in the sidebar for projects and contexts *include* the hidden project actions, because I haven't fixed that yet. Also, excluding the hidden project actions is done in a really clunky way until I can get my head around the new acts_as_todo_container class. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@339 a4c988fc-2ded-0310-b66e-134b36920a42
43 lines
1.9 KiB
Text
43 lines
1.9 KiB
Text
<h3>Active Projects:</h3>
|
|
<ul>
|
|
<% for project in @projects.select{|p| p.active? } -%>
|
|
<li id="sidebar-project-<%= project.id %>" class="sidebar-project"><%= link_to( sanitize(project.name), { :controller => "project", :action => "show",
|
|
:name => urlize(project.name) } ) + " (" + count_undone_todos(project,"actions") + ")" %></li>
|
|
<% end -%>
|
|
</ul>
|
|
|
|
<h3>Hidden Projects:</h3>
|
|
<ul>
|
|
<% for project in @projects.select{|p| p.hidden? } -%>
|
|
<li id="sidebar-project-<%= project.id %>" class="sidebar-project"><%= link_to( sanitize(project.name), { :controller => "project", :action => "show", :name => urlize(project.name) } ) + " (" + count_undone_todos(project,"actions") + ")" %></li>
|
|
<% end -%>
|
|
</ul>
|
|
|
|
|
|
<% if @user.preference.show_completed_projects_in_sidebar %>
|
|
<h3>Completed Projects:</h3>
|
|
<ul>
|
|
<% for project in @projects.select{|p| p.completed? } -%>
|
|
<li id="sidebar-project-<%= project.id %>" class="sidebar-project"><%= link_to( sanitize(project.name), { :controller => "project", :action => "show",
|
|
:name => urlize(project.name) } ) + " (" + count_undone_todos(project,"actions") + ")" %></li>
|
|
<% end -%>
|
|
</ul>
|
|
<% end %>
|
|
|
|
<h3>Active Contexts:</h3>
|
|
<ul>
|
|
<% for context in @contexts.reject{|c| c.hide? } -%>
|
|
<li id="sidebar-context-<%= context.id %>" class="sidebar-context"><%= link_to( sanitize(context.name), { :controller => "context", :action => "show",
|
|
:name => urlize(context.name) } ) + " (" + count_undone_todos(context,"actions") + ")" %></li>
|
|
<% end -%>
|
|
</ul>
|
|
|
|
<% if @user.preference.show_hidden_contexts_in_sidebar %>
|
|
<h3>Hidden Contexts:</h3>
|
|
<ul>
|
|
<% for context in @contexts.reject{|c| !c.hide? } -%>
|
|
<li id="sidebar-context-<%= context.id %>" class="sidebar-context"><%= link_to( sanitize(context.name), { :controller => "context", :action => "show",
|
|
:name => urlize(context.name) } ) + " (" + count_undone_todos(context,"actions") + ")" %></li>
|
|
<% end -%>
|
|
</ul>
|
|
<% end %>
|