mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-07 21:22:37 +01:00
add done views to projects and recurring todos
This commit is contained in:
parent
5496b84642
commit
35f947ec57
13 changed files with 166 additions and 20 deletions
|
|
@ -1,5 +1,12 @@
|
|||
<%-
|
||||
total_count ||= -1
|
||||
total_count_string = total_count!=-1 ? " / #{total_count}" : ""
|
||||
-%>
|
||||
<div class="project-state-group" id="list-<%= state %>-projects-container" <%= " style=\"display:none\"" if project_state_group.empty? %>>
|
||||
<h2><span id="<%= state %>-projects-count" class="badge"><%= project_state_group.length %></span><%= t('states.'+state+'_plural' )%> <%= t('common.projects') %></h2>
|
||||
<h2>
|
||||
<span id="<%= state %>-projects-count" class="badge"><%= project_state_group.length%><%= total_count_string%></span>
|
||||
<%= t('common.last' )%> <%= t('states.'+state+'_plural' )%> <%= t('common.projects') %><%= total_count==-1 ? "" : " ("+link_to("Show all", done_projects_path)+")"%>
|
||||
</h2>
|
||||
<div class="menu_sort"><span class="sort_separator"><%= t('common.sort.sort') %> </span>
|
||||
<div class="alpha_sort">
|
||||
<%= link_to(t("common.sort.alphabetically"), alphabetize_projects_path(:state => state),
|
||||
|
|
|
|||
37
app/views/projects/done.html.erb
Normal file
37
app/views/projects/done.html.erb
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<%
|
||||
paginate_options = {
|
||||
:class => :add_note_link,
|
||||
:previous_label => '« '+ t('common.previous'),
|
||||
:next_label => t('common.next')+' »',
|
||||
:inner_window => 2
|
||||
}
|
||||
%>
|
||||
<div id="display_box">
|
||||
<div id="projects-empty-nd" style="<%= @no_projects ? 'display:block' : 'display:none'%>">
|
||||
<div class="message"><p><%= t('projects.no_projects') %></p></div>
|
||||
</div>
|
||||
|
||||
<div class="project-state-group" id="list-completed-projects-container" <%= " style=\"display:none\"" if @no_projects %>>
|
||||
<%= will_paginate @projects, paginate_options %>
|
||||
<h2>
|
||||
<span id="completed-projects-count" class="badge"><%= "#{@total} (#{@range_low}-#{@range_high})" %></span>
|
||||
<%= t('states.completed_plural' )%> <%= t('common.projects') %>
|
||||
</h2>
|
||||
<div id="list-completed-projects" class="project-list">
|
||||
<%= render :partial => 'project_listing', :collection => @projects %>
|
||||
</div>
|
||||
</div>
|
||||
<%= will_paginate @projects, paginate_options %>
|
||||
</div>
|
||||
|
||||
<div id="input_box">
|
||||
<div class="menu_sort"><h2><br/><%= t('common.sort.sort') %> <%= t('states.completed_plural' )%> <%= t('common.projects') %></h2>
|
||||
<div class="alpha_sort">
|
||||
<%= link_to(t("common.sort.alphabetically"), alphabetize_projects_path(:state => :completed),
|
||||
:id => "completed_alphabetize_link", :class => "alphabetize_link", :title => t('common.sort.alphabetically_title'), :x_confirm_message => t('common.sort.alphabetically_confirm')) %>
|
||||
</div><span class="sort_separator"> | </span><div class="tasks_sort">
|
||||
<%= link_to(t("common.sort.by_task_count"), actionize_projects_path(:state => :completed),
|
||||
:id => "completed_actionize_link", :class => "actionize_link", :title => t('common.sort.by_task_count_title'), :x_confirm_message => t('common.sort.by_task_count_title_confirm')) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
</div>
|
||||
<%= render :partial => 'project_state_group', :object => @active_projects, :locals => { :state => 'active'} %>
|
||||
<%= render :partial => 'project_state_group', :object => @hidden_projects, :locals => { :state => 'hidden'} %>
|
||||
<%= render :partial => 'project_state_group', :object => @completed_projects, :locals => { :state => 'completed'} %>
|
||||
<%= render :partial => 'project_state_group', :object => @completed_projects, :locals => { :state => 'completed', :total_count => @completed_count} %>
|
||||
</div>
|
||||
|
||||
<div id="input_box">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue