tracks/tracks/app/views/shared/sidebar.rhtml

32 lines
1.2 KiB
Text
Raw Normal View History

<h3>Active Projects:</h3>
<ul>
<% for project in @projects.reject{|p| p.done? } -%>
<li><%= link_to( sanitize(project.name), { :controller => "project", :action => "show",
:name => urlize(project.name) } ) + " (" + project.count_undone_todos("actions") + ")" %></li>
<% end -%>
</ul>
<h3>Completed Projects:</h3>
<ul>
<% for project in @projects.reject{|p| !p.done? } -%>
<li><%= link_to( sanitize(project.name), { :controller => "project", :action => "show",
:name => urlize(project.name) } ) + " (" + project.count_undone_todos("actions") + ")" %></li>
<% end -%>
</ul>
<h3>Active Contexts:</h3>
<ul>
<% for context in @contexts.reject{|c| c.hide? } -%>
<li><%= link_to( sanitize(context.name), { :controller => "context", :action => "show",
:name => urlize(context.name) } ) + " (" + context.count_undone_todos("actions") + ")" %></li>
<% end -%>
</ul>
<h3>Hidden Contexts:</h3>
<ul>
<% for context in @contexts.reject{|c| !c.hide? } -%>
<li><%= link_to( sanitize(context.name), { :controller => "context", :action => "show",
:name => urlize(context.name) } ) + " (" + context.count_undone_todos("actions") + ")" %></li>
<% end -%>
</ul>