mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-27 04:18:49 +01:00
get shared_add_new_todo feature to pass
This commit is contained in:
parent
4af9a3e28c
commit
fc69c6cfbf
3 changed files with 5 additions and 5 deletions
|
|
@ -685,6 +685,7 @@ class TodosController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html do
|
||||
init_not_done_counts
|
||||
init_project_hidden_todo_counts
|
||||
@active_projects = current_user.projects.active
|
||||
@active_contexts = current_user.contexts.active
|
||||
@hidden_projects = current_user.projects.hidden
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<% @not_done = @not_done_todos.select {|t| t.context_id == context.id } %>
|
||||
<% @not_done = @not_done_todos.select {|t| t.context_id == context.id } -%>
|
||||
<div id="c<%= context.id %>" class="container context" style="display:<%= (collapsible && @not_done.empty?) ? "none" : "block" %>">
|
||||
<h2>
|
||||
<% if collapsible -%>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
TracksPages.show_errors_for_multi_add(html_for_error_messages());
|
||||
<% end -%>
|
||||
|
||||
<% if @saved
|
||||
<% if @saved
|
||||
# the following functions assume a todo is saved or at least not nil,
|
||||
# so leave them out in case of an error
|
||||
-%>
|
||||
|
|
@ -68,11 +68,10 @@ function html_for_error_messages() {
|
|||
error_messages = @multiple_error || ""
|
||||
# add errors of individual @todos
|
||||
@todos.each do |todo|
|
||||
@todo_i = todo
|
||||
error_messages += error_messages_for('todo_i', :object_name => 'action')
|
||||
error_messages += get_list_of_error_messages_for(todo)
|
||||
end
|
||||
-%>
|
||||
return "<%= escape_javascript(error_messages)%>";
|
||||
return "<%= escape_javascript(error_messages.html_safe)%>";
|
||||
}
|
||||
|
||||
<% end # if @saved -%>
|
||||
Loading…
Add table
Add a link
Reference in a new issue