From 4ee2c2025300023a72ef3abee32cc1677d338360 Mon Sep 17 00:00:00 2001 From: Ziyan Junaideen Date: Tue, 24 Jul 2018 21:15:36 +0530 Subject: [PATCH] Hiding help if there is a left/right content block --- app/views/shared/_subnavigation.html.erb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/views/shared/_subnavigation.html.erb b/app/views/shared/_subnavigation.html.erb index 3336dad0a..87f9d86f6 100644 --- a/app/views/shared/_subnavigation.html.erb +++ b/app/views/shared/_subnavigation.html.erb @@ -54,13 +54,16 @@ title: t("shared.go_to_page") + t("layouts.header.budgets") %> <% end %> -
  • - <%= link_to t("layouts.header.help"), - help_path, - accesskey: "6", - class: ("is-active" if current_page?(help_path)), - title: t("shared.go_to_page") + t("layouts.header.help") %> -
  • + + <% unless content_block("main_navigation_left", I18n.locale) || content_block("main_navigation_right", I18n.locale) %> +
  • + <%= link_to t("layouts.header.help"), + help_path, + accesskey: "6", + class: ("is-active" if current_page?(help_path)), + title: t("shared.go_to_page") + t("layouts.header.help") %> +
  • + <% end %> <%= raw content_block("main_navigation_right", I18n.locale) %>