From 3a718d88c052c4d12d98d03789e2f1c1f9a1141a Mon Sep 17 00:00:00 2001 From: decabeza Date: Tue, 13 Nov 2018 17:36:16 +0100 Subject: [PATCH] Shows help link only if feature is enabled --- app/views/debates/new.html.erb | 7 +++++-- app/views/pages/help/how_to_use/index.html.erb | 4 +++- app/views/welcome/welcome.html.erb | 8 ++++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/views/debates/new.html.erb b/app/views/debates/new.html.erb index 54a961d69..67c90b517 100644 --- a/app/views/debates/new.html.erb +++ b/app/views/debates/new.html.erb @@ -7,8 +7,11 @@
<%= t("debates.new.info", info_link: link_to(t("debates.new.info_link"), new_proposal_path )).html_safe %> - <%= link_to help_path, title: t('shared.target_blank_html'), target: "_blank" do %> - <%= t("debates.new.more_info") %> + + <% if feature?(:help_page) %> + <%= link_to help_path, title: t("shared.target_blank_html"), target: "_blank" do %> + <%= t("debates.new.more_info") %> + <% end %> <% end %>
<%= render "form" %> diff --git a/app/views/pages/help/how_to_use/index.html.erb b/app/views/pages/help/how_to_use/index.html.erb index a37920563..096a4d7cb 100644 --- a/app/views/pages/help/how_to_use/index.html.erb +++ b/app/views/pages/help/how_to_use/index.html.erb @@ -4,7 +4,9 @@
- <%= back_link_to help_path %> + <% if feature?(:help_page) %> + <%= back_link_to help_path %> + <% end %>

<%= t('pages.help.titles.how_to_use') %>

diff --git a/app/views/welcome/welcome.html.erb b/app/views/welcome/welcome.html.erb index d647ba8e6..c8a3641a4 100644 --- a/app/views/welcome/welcome.html.erb +++ b/app/views/welcome/welcome.html.erb @@ -40,7 +40,11 @@ <%= link_to(t("welcome.welcome.user_permission_verify_my_account"), verification_path, class: "button success radius expand") %> <% end %> -

- <%= link_to t("welcome.welcome.go_to_index"), proposals_path %> +

+ <% if feature?(:help_page) %> + <%= link_to t("welcome.welcome.go_to_index"), help_path %> + <% else %> + <%= link_to t("welcome.welcome.go_to_index"), root_path %> + <% end %>