mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-28 11:46:10 +01:00
* Consolidated toggle_check handling to todo_controller and rjs * Introduced user preference to show/hide hidden projects section in sidebar * Fixed a bug in parse_date_per_user_prefs that was causing due dates to be set in the todo model as Times and not Dates * Upgraded ARTS plugin * This changeset includes migrations, so remember to db:migrate. * Lots of code changes here, so bug reports will be gratefully accepted! git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@343 a4c988fc-2ded-0310-b66e-134b36920a42
44 lines
2 KiB
Text
44 lines
2 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>
|
|
|
|
<% if @user.preference.show_hidden_projects_in_sidebar %>
|
|
<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>
|
|
<% end %>
|
|
|
|
<% 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 %>
|