(replace 'taskname' with the task itself)
create the proper routes in /config/routes.rb
:
# task main routes
get "taskname", to: "fixer#taskname", :as => "taskname"
get "taskname/progress", to: "fixer#progress_taskname", :as => "taskname_progress"
get "taskname/progress_all", to: "fixer#progress_taskname_all", :as => "taskname_progress_all"
# task progress json endpoints
get "taskname/progress_user", to: "fixer#session_progress_taskname_for_sheet"
get "taskname/progress_sheet", to: "fixer#progress_sheet_taskname"
- add the necessary code to
/app/controllers/fixer_controller.rb
to handle the new routes. For example:def taskname
,def progress_taskname
,def progress_taskname_all
,def session_progress_taskname_for_sheet
,def progress_sheet_taskname
- add the necessary code to
/app/models/sheet.rb
to support the new task. pay special attention toself.polygons_for_task
andself.random_unprocessed
add proper files to /app/views/fixer/
:
mention class="compact"
for button wrapper
taskname.html.erb
progress_taskname.html.erb
progress_taskname_all.html.erb
add proper files to /app/assets/javascripts/
:
inspector_taskname.coffee
progress_taskname.coffee
create a tutorial video
add proper files to /app/assets/stylesheets/
(if necessary):
taskname.css.scss
if task has its own images
- add images folder:
/app/assets/images/taskname/
/app/views/partials/_score.html.erb
shows the progress submenus (view my progress, consensus progress)
modify it to support the new progress views that apply
for /app/controllers/application_controller.rb
:
- global_variables(): add the task to the list
- sort_tasks(): update sorting
add consensus rake tasks in /lib/tasks/flag_processing.rake