mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-28 10:04:07 +01:00
refactor done todos view and tests
This commit is contained in:
parent
aac744e411
commit
85fc82d494
16 changed files with 141 additions and 116 deletions
|
|
@ -1,31 +1,13 @@
|
|||
<div id="display_box_projects">
|
||||
<div class="container">
|
||||
<h2><%= t('todos.completed_today') %></h2>
|
||||
<% if @done_today.empty? -%>
|
||||
<div class="message"><p><%= t('todos.no_completed_actions') %></p></div>
|
||||
<% else -%>
|
||||
<%= render :partial => "todos/todo", :collection => @done_today, :locals => { :parent_container_type => "completed", :suppress_context => false, :suppress_project => false } %>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h2><%= t('todos.completed_rest_of_week') %></h2>
|
||||
<% if @done_this_week.empty? -%>
|
||||
<div class="message"><p><%= t('todos.no_completed_actions') %></p></div>
|
||||
<% else -%>
|
||||
<%= render :partial => "todos/todo", :collection => @done_this_week, :locals => { :parent_container_type => "completed", :suppress_context => false, :suppress_project => false } %>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h2><%= t('todos.completed_rest_of_month') %></h2>
|
||||
<% if @done_this_month.empty? -%>
|
||||
<div class="message"><p><%= t('todos.no_completed_actions') %></p></div>
|
||||
<% else -%>
|
||||
<%= render :partial => "todos/todo", :collection => @done_this_month, :locals => { :parent_container_type => "completed", :suppress_context => false, :suppress_project => false } %>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<p><%= raw t('todos.see_all_completed', :link => link_to(t("todos.all_completed_here"), determine_all_done_path)) %></p>
|
||||
<%= show_completed_todos_for("today", @done_today) %>
|
||||
<%= show_completed_todos_for("rest_of_week", @done_rest_of_week) %>
|
||||
<%= show_completed_todos_for("rest_of_month", @done_rest_of_month) %>
|
||||
|
||||
<p>
|
||||
<%= raw t('todos.see_all_completed',
|
||||
:link => link_to(t("todos.all_completed_here"), determine_all_done_path))
|
||||
%>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue