Refactor how section ordering is handled (#1837)
* Extract template customizations into own controller

* Refactor Template model methods

* Fix view logic in draggable sections

* Add button for customising phase

* Fix rubocop violations in GuidanceService

* Rename GuidanceService to GuidancePresenter

* Fix bug in phase preview order sections

* Refactor preview action/controller code

* Fix Section ordering in various views

* Fix rubocop violations

* Fix bug forcing Phases to be modifiable

* Fix broken tests

* Update method to check if section is draggable

* Extract copy action into its own resource

* Extract customization transfers to own controller

* Remove redundant routing condition

* Fix Rubocop violation issues

* Change condition for section draggable

* Refactor instance variable in PlansController

* Fix broken tests

* Add test support for 'de' locale

* Fix merge issue in plans controller

* Fix broken specs in plan#request_feedback
dev
1 parent e10aaf3 commit 3039ef5f52d9458bdf2910ca4e9637a5b79d269b
@Gavin Morrice Gavin Morrice authored on 28 Aug 2018
Sam Rust committed on 28 Aug 2018
Showing 35 changed files
View
app/controllers/concerns/template_methods.rb 0 → 100644
View
app/controllers/org_admin/phase_versions_controller.rb 0 → 100644
View
app/controllers/org_admin/phases_controller.rb
View
app/controllers/org_admin/sections_controller.rb
View
app/controllers/org_admin/template_copies_controller.rb 0 → 100644
View
app/controllers/org_admin/template_customization_transfers_controller.rb 0 → 100644
View
app/controllers/org_admin/template_customizations_controller.rb 0 → 100644
View
app/controllers/org_admin/templates_controller.rb
View
app/controllers/plans_controller.rb
View
app/helpers/sections_helper.rb
View
app/models/plan.rb
View
app/models/template.rb
View
app/presenters/guidance_presenter.rb 0 → 100644
View
app/services/guidance_service.rb 100644 → 0
View
app/views/org_admin/phases/_phase.html.erb
View
app/views/org_admin/phases/container.html.erb
View
app/views/org_admin/phases/preview.html.erb
View
app/views/org_admin/sections/_section.html.erb
View
app/views/org_admin/sections/_section_group.html.erb
View
app/views/paginable/templates/_customisable.html.erb
View
app/views/paginable/templates/_organisational.html.erb
View
app/views/phases/_edit_plan_answers.html.erb
View
app/views/phases/_guidances_notes.html.erb
View
app/views/phases/_overview.html.erb
View
app/views/phases/edit.html.erb
View
app/views/public_pages/template_export.docx.erb
View
app/views/public_pages/template_export.pdf.erb
View
config/application.rb
View
config/routes.rb
View
lib/assets/javascripts/views/org_admin/phases/new_edit.js
View
spec/factories/phases.rb
View
spec/factories/templates.rb
View
spec/features/annotations/annotations_editing_spec.rb
View
spec/models/plan_spec.rb
View
spec/support/locales.rb 0 → 100644