From 9ad8c5728aa6f01a97be3ce6e23a5853e13bf389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 19 Nov 2018 14:07:03 +0100 Subject: [PATCH] Refactor legislation process subnav --- app/helpers/legislation_helper.rb | 9 ++++ .../legislation/processes/_subnav.html.erb | 48 ++++--------------- 2 files changed, 19 insertions(+), 38 deletions(-) diff --git a/app/helpers/legislation_helper.rb b/app/helpers/legislation_helper.rb index 38eba39ad..b2cd1399c 100644 --- a/app/helpers/legislation_helper.rb +++ b/app/helpers/legislation_helper.rb @@ -26,4 +26,13 @@ module LegislationHelper method: :patch, class: html_class end + + def legislation_process_tabs(process) + { + "info" => edit_admin_legislation_process_path(process), + "questions" => admin_legislation_process_questions_path(process), + "proposals" => admin_legislation_process_proposals_path(process), + "draft_versions" => admin_legislation_process_draft_versions_path(process) + } + end end diff --git a/app/views/admin/legislation/processes/_subnav.html.erb b/app/views/admin/legislation/processes/_subnav.html.erb index 7f3903101..56ec8971c 100644 --- a/app/views/admin/legislation/processes/_subnav.html.erb +++ b/app/views/admin/legislation/processes/_subnav.html.erb @@ -1,41 +1,13 @@