mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Rename to_xml_params to todo_xml_params
This commit is contained in:
parent
8fe343cccc
commit
c1597a7751
3 changed files with 11 additions and 11 deletions
|
|
@ -256,7 +256,7 @@ class ApplicationController < ActionController::Base
|
||||||
@z_index_counter = 500
|
@z_index_counter = 500
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_xml_params
|
def todo_xml_params
|
||||||
if params[:limit_fields] == 'index'
|
if params[:limit_fields] == 'index'
|
||||||
return [:only => [:id, :created_at, :updated_at, :completed_at] ]
|
return [:only => [:id, :created_at, :updated_at, :completed_at] ]
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class CalendarController < ApplicationController
|
||||||
render :action => 'show', :layout => false, :content_type => Mime::ICS
|
render :action => 'show', :layout => false, :content_type => Mime::ICS
|
||||||
}
|
}
|
||||||
format.xml {
|
format.xml {
|
||||||
render :xml => @due_all.to_xml( *to_xml_params )
|
render :xml => @due_all.to_xml( *todo_xml_params )
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ class TodosController < ApplicationController
|
||||||
headers['Content-Type']=Mime::TEXT.to_s
|
headers['Content-Type']=Mime::TEXT.to_s
|
||||||
render :content_type => Mime::TEXT
|
render :content_type => Mime::TEXT
|
||||||
end
|
end
|
||||||
format.xml { render :xml => @todos.to_xml( *to_xml_params ) }
|
format.xml { render :xml => @todos.to_xml( *todo_xml_params ) }
|
||||||
format.rss { @feed_title, @feed_description = 'Tracks Actions', "Actions for #{current_user.display_name}" }
|
format.rss { @feed_title, @feed_description = 'Tracks Actions', "Actions for #{current_user.display_name}" }
|
||||||
format.atom { @feed_title, @feed_description = 'Tracks Actions', "Actions for #{current_user.display_name}" }
|
format.atom { @feed_title, @feed_description = 'Tracks Actions', "Actions for #{current_user.display_name}" }
|
||||||
format.ics
|
format.ics
|
||||||
|
|
@ -240,7 +240,7 @@ class TodosController < ApplicationController
|
||||||
@todo = current_user.todos.find(params['id'])
|
@todo = current_user.todos.find(params['id'])
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.m { render :action => 'show' }
|
format.m { render :action => 'show' }
|
||||||
format.xml { render :xml => @todo.to_xml( *to_xml_params ) }
|
format.xml { render :xml => @todo.to_xml( *todo_xml_params ) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -326,7 +326,7 @@ class TodosController < ApplicationController
|
||||||
end
|
end
|
||||||
render
|
render
|
||||||
end
|
end
|
||||||
format.xml { render :xml => @todo.to_xml( *to_xml_params ) }
|
format.xml { render :xml => @todo.to_xml( *todo_xml_params ) }
|
||||||
format.html do
|
format.html do
|
||||||
if @saved
|
if @saved
|
||||||
# TODO: I think this will work, but can't figure out how to test it
|
# TODO: I think this will work, but can't figure out how to test it
|
||||||
|
|
@ -361,7 +361,7 @@ class TodosController < ApplicationController
|
||||||
@saved = true # cannot determine error
|
@saved = true # cannot determine error
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
format.xml { render :xml => @todo.to_xml( *to_xml_params ) }
|
format.xml { render :xml => @todo.to_xml( *todo_xml_params ) }
|
||||||
format.html { redirect_to request.referrer}
|
format.html { redirect_to request.referrer}
|
||||||
format.m {
|
format.m {
|
||||||
if cookies[:mobile_url]
|
if cookies[:mobile_url]
|
||||||
|
|
@ -393,7 +393,7 @@ class TodosController < ApplicationController
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js { render :action => :update }
|
format.js { render :action => :update }
|
||||||
format.xml { render :xml => @todo.to_xml( *to_xml_params ) }
|
format.xml { render :xml => @todo.to_xml( *todo_xml_params ) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -436,7 +436,7 @@ class TodosController < ApplicationController
|
||||||
@status_message = t('todos.added_new_project') + ' / ' + @status_message if @new_project_created
|
@status_message = t('todos.added_new_project') + ' / ' + @status_message if @new_project_created
|
||||||
@status_message = t('todos.added_new_context') + ' / ' + @status_message if @new_context_created
|
@status_message = t('todos.added_new_context') + ' / ' + @status_message if @new_context_created
|
||||||
}
|
}
|
||||||
format.xml { render :xml => @todo.to_xml( *to_xml_params ) }
|
format.xml { render :xml => @todo.to_xml( *todo_xml_params ) }
|
||||||
format.m do
|
format.m do
|
||||||
if @saved
|
if @saved
|
||||||
do_mobile_todo_redirection
|
do_mobile_todo_redirection
|
||||||
|
|
@ -526,7 +526,7 @@ class TodosController < ApplicationController
|
||||||
format.html
|
format.html
|
||||||
format.xml do
|
format.xml do
|
||||||
completed_todos = current_user.todos.completed
|
completed_todos = current_user.todos.completed
|
||||||
render :xml => completed_todos.to_xml( *to_xml_params )
|
render :xml => completed_todos.to_xml( *todo_xml_params )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -563,7 +563,7 @@ class TodosController < ApplicationController
|
||||||
@completed_projects = current_user.projects.completed
|
@completed_projects = current_user.projects.completed
|
||||||
end
|
end
|
||||||
format.m
|
format.m
|
||||||
format.xml { render :xml => @not_done_todos.to_xml( *to_xml_params ) }
|
format.xml { render :xml => @not_done_todos.to_xml( *todo_xml_params ) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -737,7 +737,7 @@ class TodosController < ApplicationController
|
||||||
@hidden = current_user.todos.hidden
|
@hidden = current_user.todos.hidden
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.xml {
|
format.xml {
|
||||||
render :xml => @hidden.to_xml( *to_xml_params )
|
render :xml => @hidden.to_xml( *todo_xml_params )
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue