mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-24 16:14:07 +01:00
get destroying of actions working
This commit is contained in:
parent
e13e946295
commit
33f68df154
18 changed files with 246 additions and 96 deletions
|
|
@ -112,17 +112,17 @@ class RecurringTodosController < ApplicationController
|
|||
end
|
||||
|
||||
if @saved
|
||||
@message = "The recurring todo was saved"
|
||||
@status_message = "The recurring todo was saved"
|
||||
@todo_saved = create_todo_from_recurring_todo(@recurring_todo).nil? == false
|
||||
if @todo_saved
|
||||
@message += " / created a new todo"
|
||||
@status_message += " / created a new todo"
|
||||
else
|
||||
@message += " / did not create todo"
|
||||
@status_message += " / did not create todo"
|
||||
end
|
||||
@down_count = current_user.recurring_todos.active.count
|
||||
@new_recurring_todo = RecurringTodo.new
|
||||
else
|
||||
@message = "Error saving recurring todo"
|
||||
@status_message = "Error saving recurring todo"
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
|
|
|
|||
|
|
@ -118,6 +118,11 @@ class TodosController < ApplicationController
|
|||
@initial_context_name = params['default_context_name']
|
||||
@initial_project_name = params['default_project_name']
|
||||
@default_tags = @todo.project.default_tags unless @todo.project.nil?
|
||||
@status_message = 'Added new next action'
|
||||
@status_message += ' to tickler' if @todo.deferred?
|
||||
@status_message += ' in pending state' if @todo.pending?
|
||||
@status_message = 'Added new project / ' + status_message if @new_project_created
|
||||
@status_message = 'Added new context / ' + status_message if @new_context_created
|
||||
render :action => 'create'
|
||||
end
|
||||
format.xml do
|
||||
|
|
@ -295,6 +300,7 @@ class TodosController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.js
|
||||
format.xml { render :xml => @todo.to_xml( :except => :user_id ) }
|
||||
format.html { redirect_to request.referrer}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -452,6 +458,7 @@ class TodosController < ApplicationController
|
|||
end
|
||||
|
||||
def destroy
|
||||
@source_view = params['_source_view'] || 'todo'
|
||||
@todo = get_todo_from_params
|
||||
@original_item_due = @todo.due
|
||||
@context_id = @todo.context_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue