diff --git a/app/helpers/links_helper.rb b/app/helpers/links_helper.rb index 6c4f29630..dcca17693 100644 --- a/app/helpers/links_helper.rb +++ b/app/helpers/links_helper.rb @@ -4,4 +4,12 @@ module LinksHelper t("links.form.delete_button"), builder, class: "delete remove-element" end + + def link_to_signin(options = {}) + link_to t("users.signin"), new_user_session_path, options + end + + def link_to_signup(options = {}) + link_to t("users.signup"), new_user_registration_path, options + end end diff --git a/app/views/budgets/index.html.erb b/app/views/budgets/index.html.erb index cc55283a4..3279b4e04 100644 --- a/app/views/budgets/index.html.erb +++ b/app/views/budgets/index.html.erb @@ -44,9 +44,7 @@ <% else %>
<%= t("budgets.investments.index.sidebar.not_logged_in", - sign_in: link_to(t("users.signin"), new_user_session_path), - sign_up: link_to(t("users.signup"), new_user_registration_path) - ).html_safe %> + sign_in: link_to_signin, sign_up: link_to_signup).html_safe %>
<% end %> <% end %> diff --git a/app/views/budgets/investments/_ballot.html.erb b/app/views/budgets/investments/_ballot.html.erb index df7856927..0507d9090 100644 --- a/app/views/budgets/investments/_ballot.html.erb +++ b/app/views/budgets/investments/_ballot.html.erb @@ -44,8 +44,6 @@ diff --git a/app/views/direct_messages/new.html.erb b/app/views/direct_messages/new.html.erb index 513d4ab6d..cfd03a460 100644 --- a/app/views/direct_messages/new.html.erb +++ b/app/views/direct_messages/new.html.erb @@ -10,8 +10,7 @@

<%= t("users.login_to_continue", - signin: link_to(t("users.signin"), new_user_session_path), - signup: link_to(t("users.signup"), new_user_registration_path)).html_safe %> + signin: link_to_signin, signup: link_to_signup).html_safe %>

<% elsif not @receiver.email_on_direct_message? %> diff --git a/app/views/legislation/annotations/_comments_box.html.erb b/app/views/legislation/annotations/_comments_box.html.erb index 9dc735f43..7340f7e04 100644 --- a/app/views/legislation/annotations/_comments_box.html.erb +++ b/app/views/legislation/annotations/_comments_box.html.erb @@ -35,8 +35,7 @@
diff --git a/app/views/legislation/processes/_help_gif.html.erb b/app/views/legislation/processes/_help_gif.html.erb index 943da67de..fdf00a2c5 100644 --- a/app/views/legislation/processes/_help_gif.html.erb +++ b/app/views/legislation/processes/_help_gif.html.erb @@ -12,8 +12,7 @@ <% else %>

<%= t("annotator.help.text", - sign_in: link_to(t("users.signin"), new_user_session_path), - sign_up: link_to(t("users.signup"), new_user_registration_path)).html_safe %> + sign_in: link_to_signin, sign_up: link_to_signup).html_safe %>

<% end %> diff --git a/app/views/legislation/questions/_participation_not_allowed.html.erb b/app/views/legislation/questions/_participation_not_allowed.html.erb index 2c7d85782..da08ab9c0 100644 --- a/app/views/legislation/questions/_participation_not_allowed.html.erb +++ b/app/views/legislation/questions/_participation_not_allowed.html.erb @@ -14,8 +14,7 @@ <% elsif !user_signed_in? %> <% elsif !@process.debate_phase.open? %>