tracks/config/routes.rb

153 lines
5.2 KiB
Ruby
Raw Normal View History

Rails.application.routes.draw do
mount Tolk::Engine => '/tolk', :as => 'tolk' if Rails.env=='development'
root :to => 'todos#index'
2013-04-30 19:18:27 -05:00
post 'mailgun/mime' => 'mailgun#mailgun'
2013-05-11 23:12:20 +02:00
post 'login' => 'login#login'
get 'login' => 'login#login'
2013-05-11 23:12:20 +02:00
get 'login/check_expiry' => 'login#check_expiry'
get 'logout' => 'login#logout'
get "tickler" => "todos#list_deferred"
get 'review' => "projects#review"
get 'calendar' => "calendar#show"
get 'done' => "stats#done", :as => 'done_overview'
get 'search' => 'search#index'
post 'search/results' => 'search#results', :via => 'post'
2013-05-11 23:12:20 +02:00
get 'data' => "data#index"
get 'data/csv_notes' => 'data#csv_notes'
get 'data/yaml_export' => 'data#yaml_export'
get 'data/xml_export' => 'data#xml_export'
get 'data/csv_actions' => 'data#csv_actions'
get 'integrations' => "integrations#index"
get 'integrations/rest_api' => "integrations#rest_api", :as => 'rest_api_docs'
get 'integrations/cloudmailin' => 'integrations#cloudmailin'
get 'integrations/search_plugin' => "integrations#search_plugin", :as => 'search_plugin'
get 'integrations/google_gadget.xml' => 'integrations#google_gadget', :as => 'google_gadget'
get 'integrations/get_applescript1.js' => 'integrations#get_applescript1'
get 'integrations/get_applescript2.js' => 'integrations#get_applescript2'
get 'integrations/get_quicksilver_applescript.js' => 'integrations#get_quicksilver_applescript'
get 'preferences' => "preferences#index"
get 'preferences/render_date_format' => "preferences#render_date_format"
get 'feeds' => "feedlist#index", :as => 'feeds'
get 'feedlist/get_feeds_for_context' => 'feedlist#get_feeds_for_context'
get 'feedlist/get_feeds_for_project' => 'feedlist#get_feeds_for_project'
get 'stats' => 'stats#index'
get 'stats/actions_done_last12months_data' => 'stats#actions_done_last12months_data'
get 'stats/actions_done_last_years' => 'stats#actions_done_last_years'
get 'stats/actions_done_lastyears_data' => 'stats#actions_done_lastyears_data'
get 'stats/actions_done_last30days_data' => 'stats#actions_done_last30days_data'
get 'stats/actions_completion_time_data' => 'stats#actions_completion_time_data'
get 'stats/actions_running_time_data' => 'stats#actions_running_time_data'
get 'stats/actions_visible_running_time_data' => 'stats#actions_visible_running_time_data'
get 'stats/actions_open_per_week_data' => 'stats#actions_open_per_week_data'
get 'stats/context_total_actions_data' => 'stats#context_total_actions_data'
get 'stats/context_running_actions_data' => 'stats#context_running_actions_data'
get 'stats/actions_day_of_week_all_data' => 'stats#actions_day_of_week_all_data'
get 'stats/actions_day_of_week_30days_data' => 'stats#actions_day_of_week_30days_data'
get 'stats/actions_time_of_day_all_data' => 'stats#actions_time_of_day_all_data'
get 'stats/actions_time_of_day_30days_data' => 'stats#actions_time_of_day_30days_data'
get 'stats/show_selected_actions_from_chart/:id' => 'stats#show_selected_actions_from_chart', :as => 'show_actions_from_chart'
2013-04-30 19:18:27 -05:00
2012-04-11 17:36:22 +02:00
resources :contexts do
member do
get 'done_todos'
get 'all_done_todos'
end
2012-04-27 14:22:16 +02:00
collection do
post 'order'
get 'done'
end
resources :todos
2012-04-11 17:36:22 +02:00
end
2013-04-30 19:18:27 -05:00
2012-04-11 17:36:22 +02:00
resources :projects do
member do
get 'done_todos'
get 'all_done_todos'
get 'set_reviewed' # TODO: convert to PUT/POST
end
collection do
get 'done'
post 'order'
post 'alphabetize'
post 'actionize'
end
2012-04-27 14:22:16 +02:00
resources :todos
2012-04-11 17:36:22 +02:00
end
2013-04-30 19:18:27 -05:00
2012-04-11 17:36:22 +02:00
resources :todos do
member do
put 'toggle_check'
put 'toggle_star'
put 'defer'
get 'show_notes'
get 'convert_to_project' # TODO: convert to PUT/POST
delete 'remove_predecessor' # TODO: convert to PUT/POST
post 'change_context'
2012-04-11 17:36:22 +02:00
end
collection do
get 'done'
get 'all_done'
post 'check_deferred'
post 'filter_to_context'
post 'filter_to_project'
post 'add_predecessor'
2012-04-11 17:36:22 +02:00
end
end
# match /todos/tag and put everything in :name, including extensions like .m and .txt.
# This means the controller action needs to parse the extension and set format/content type
# Needed for /todos/tag/first.last.m to work
get 'todos/tag/:name' => 'todos#tag', :as => :tag, :format => false, :name => /.*/
get 'tags.autocomplete' => "todos#tags", :format => 'autocomplete'
2013-05-11 23:12:20 +02:00
get 'todos/done/tag/:name' => "todos#done_tag", :as => :done_tag
get 'todos/all_done/tag/:name' => "todos#all_done_tag", :as => :all_done_tag
get 'auto_complete_for_predecessor' => 'todos#auto_complete_for_predecessor'
get 'mobile' => 'todos#index', :format => 'm'
get 'm' => 'todos#index', :format => 'm'
resources :recurring_todos do
member do
put 'toggle_check'
put 'toggle_star'
end
collection do
get 'done'
end
end
2013-04-30 19:18:27 -05:00
2012-04-19 00:02:42 +02:00
resources :users do
member do
get 'change_password'
get 'change_auth_type'
get 'complete'
post 'update_password'
post 'update_auth_type'
post 'refresh_token'
end
end
2013-05-11 23:12:20 +02:00
get 'signup' => "users#new"
2013-04-30 19:18:27 -05:00
2012-04-11 17:36:22 +02:00
resources :notes
2012-05-12 14:01:56 +02:00
resources :preferences
2013-04-30 19:18:27 -05:00
resources :data do
collection do
get :import
post :csv_map
post :csv_import
end
end
2008-06-16 16:13:33 +02:00
end