diff --git a/app/helpers/comments_helper.rb b/app/helpers/comments_helper.rb index 491944c03..c3532b578 100644 --- a/app/helpers/comments_helper.rb +++ b/app/helpers/comments_helper.rb @@ -41,8 +41,15 @@ module CommentsHelper end def commentable_path(comment) - if comment.commentable_type == "Budget::Investment" - budget_investment_path(comment.commentable.budget_id, comment.commentable) + commentable = comment.commentable + + case comment.commentable_type + when "Budget::Investment" + budget_investment_path(commentable.budget_id, commentable) + when "Legislation::Question" + legislation_process_question_path(commentable.process, commentable) + when "Legislation::Annotation" + legislation_process_draft_version_annotation_path(commentable.draft_version.process, commentable.draft_version, commentable) else comment.commentable end diff --git a/app/helpers/legislation_helper.rb b/app/helpers/legislation_helper.rb index a49bb1e8e..3a993d683 100644 --- a/app/helpers/legislation_helper.rb +++ b/app/helpers/legislation_helper.rb @@ -6,12 +6,4 @@ module LegislationHelper def format_date_for_calendar_form(date) l(date, format: "%d/%m/%Y") if date end - - def legislation_question_path(question) - legislation_process_question_path(question.process, question) - end - - def legislation_annotation_path(annotation) - legislation_process_draft_version_annotation_path(annotation.draft_version.process, annotation.draft_version, annotation) - end end diff --git a/app/views/legislation/processes/_header.html.erb b/app/views/legislation/processes/_header.html.erb index 945d1c59f..546f238d1 100644 --- a/app/views/legislation/processes/_header.html.erb +++ b/app/views/legislation/processes/_header.html.erb @@ -5,13 +5,9 @@

<%= process.title %>

- - -

Suscrito

-
- +

<%= t('legislation.processes.header_full.description') %>

@@ -31,7 +27,7 @@
- +
diff --git a/app/views/legislation/processes/_header_full.html.erb b/app/views/legislation/processes/_header_full.html.erb index 510907979..dfa9bffdd 100644 --- a/app/views/legislation/processes/_header_full.html.erb +++ b/app/views/legislation/processes/_header_full.html.erb @@ -7,10 +7,6 @@
- -

Suscríbete al proceso

-

Recibe notificaciones clave sobre el proceso

-