mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-09 00:54:21 +01:00
fix failing calendar scenarios
This commit is contained in:
parent
78a7bfe8e4
commit
5f8f2eefa9
8 changed files with 44 additions and 74 deletions
|
|
@ -1,54 +1,10 @@
|
|||
<div id="display_box">
|
||||
|
||||
<div class="container">
|
||||
<h2><%= t('todos.calendar.due_today') %></h2>
|
||||
<div id="empty_due_today" <%= raw "style=\"display:none\"" unless @due_today.empty? %>>
|
||||
<%= t('todos.calendar.no_actions_due_today') %>
|
||||
</div>
|
||||
<div id="due_today">
|
||||
<%= render :partial => "todos/todo", :collection => @due_today %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h2><%= t('todos.calendar.due_this_week') %></h2>
|
||||
<div id="empty_due_this_week" <%= raw "style=\"display:none\"" unless @due_this_week.empty? %>>
|
||||
<%= t('todos.no_actions_due_this_week') %>
|
||||
</div>
|
||||
<div id="due_this_week">
|
||||
<%= render :partial => "todos/todo", :collection => @due_this_week %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h2><%= t('todos.calendar.due_next_week') %></h2>
|
||||
<div id="empty_due_next_week" <%= raw "style=\"display:none\"" unless @due_next_week.empty? %>>
|
||||
<%= t('todos.calendar.no_actions_due_next_week') %>
|
||||
</div>
|
||||
<div id="due_next_week">
|
||||
<%= render :partial => "todos/todo", :collection => @due_next_week %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h2><%= t('todos.calendar.due_this_month', :month => l(Time.zone.now, :format => "%B")) %></h2>
|
||||
<div id="empty_due_this_month" <%= raw "style=\"display:none\"" unless @due_this_month.empty? %>>
|
||||
<%= t('todos.calendar.no_actions_due_this_month') %>
|
||||
</div>
|
||||
<div id="due_this_month">
|
||||
<%= render :partial => "todos/todo", :collection => @due_this_month %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h2><%= t('todos.calendar.due_next_month_and_later', :month => l(Time.zone.now+1.month, :format => "%B")) %></h2>
|
||||
<div id="empty_due_after_this_month" <%= raw "style=\"display:none\"" unless @due_after_this_month.empty? %>>
|
||||
<%= t('todos.calendar.no_actions_due_after_this_month') %>
|
||||
</div>
|
||||
<div id="due_after_this_month">
|
||||
<%= render :partial => "todos/todo", :collection => @due_after_this_month %>
|
||||
</div>
|
||||
</div>
|
||||
<%= todos_calendar_container(:due_today, @due_today ) %>
|
||||
<%= todos_calendar_container(:due_this_week, @due_this_week ) %>
|
||||
<%= todos_calendar_container(:due_next_week, @due_next_week ) %>
|
||||
<%= todos_calendar_container(:due_this_month, @due_this_month ) %>
|
||||
<%= todos_calendar_container(:due_after_this_month, @due_after_this_month) %>
|
||||
|
||||
</div><!-- End of display_box -->
|
||||
<div class="input_box" id="input_box">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<% if !@saved -%>
|
||||
<% unless @saved -%>
|
||||
TracksPages.page_notify('error', "<%= t('todos.error_toggle_complete') %>", 5);
|
||||
<% else -%>
|
||||
<% if @wants_redirect_after_complete && @todo.completed? -%>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
animation << "add_todo_to_context" unless source_view_is(:done)
|
||||
animation << "block_predecessors"
|
||||
end
|
||||
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo)
|
||||
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo, :deferred)
|
||||
animation << "regenerate_predecessor_family"
|
||||
else
|
||||
animation << "replace_todo"
|
||||
|
|
@ -24,7 +24,6 @@
|
|||
<%= render_animation(animation) %>
|
||||
TracksPages.set_page_badge(<%= @down_count %>);
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
function redirect_after_complete() {
|
||||
var path = "<%= @todo.project_id.nil? ? "/" : project_path(@todo.project) -%>";
|
||||
|
|
@ -206,4 +205,6 @@ function html_for_todo() {
|
|||
end
|
||||
-%>
|
||||
return "<%= js %>";
|
||||
}
|
||||
}
|
||||
|
||||
<% end -%>
|
||||
Loading…
Add table
Add a link
Reference in a new issue