From 3a718d88c052c4d12d98d03789e2f1c1f9a1141a Mon Sep 17 00:00:00 2001 From: decabeza Date: Tue, 13 Nov 2018 17:36:16 +0100 Subject: [PATCH 1/2] 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 %>

From b08d48807757c931ff44c09cf749467b218d2255 Mon Sep 17 00:00:00 2001 From: decabeza Date: Tue, 13 Nov 2018 17:36:23 +0100 Subject: [PATCH 2/2] Updates link url on dev seed widgets --- db/dev_seeds/widgets.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/dev_seeds/widgets.rb b/db/dev_seeds/widgets.rb index 884bd7cb8..f8cc83ff1 100644 --- a/db/dev_seeds/widgets.rb +++ b/db/dev_seeds/widgets.rb @@ -21,7 +21,7 @@ section "Creating header and cards for the homepage" do label_en: 'Welcome to', label_es: 'Bienvenido a', - link_url: 'help_path', + link_url: 'http://consulproject.org/', header: TRUE, image_attributes: create_image_attachment('header') )