diff --git a/app/helpers/layouts_helper.rb b/app/helpers/layouts_helper.rb new file mode 100644 index 000000000..c92f57898 --- /dev/null +++ b/app/helpers/layouts_helper.rb @@ -0,0 +1,12 @@ +module LayoutsHelper + + def layout_menu_link_to(text, path, is_active, options) + if is_active + content_tag(:span, t('shared.you_are_in'), class: 'sr-only') + ' ' + + link_to(text, path, options.merge(class: "active")) + else + link_to(text, path, options) + end + end + +end diff --git a/app/views/shared/_subnavigation.html.erb b/app/views/shared/_subnavigation.html.erb index 9d87a0294..9e1eb9035 100644 --- a/app/views/shared/_subnavigation.html.erb +++ b/app/views/shared/_subnavigation.html.erb @@ -2,22 +2,31 @@ diff --git a/config/locales/en.yml b/config/locales/en.yml index 66dc4c752..d45ad44f7 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -449,6 +449,7 @@ en: districts_list: "Districts list" categories: "Categories" target_blank_html: " (link opens in new window)" + you_are_in: "You are in" unflag: Unflag outline: debates: Debates diff --git a/config/locales/es.yml b/config/locales/es.yml index 3bd11ecbf..345b5b453 100755 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -449,6 +449,7 @@ es: districts_list: "Listado de distritos" categories: "Categorías" target_blank_html: " (se abre en ventana nueva)" + you_are_in: "Estás en" unflag: Deshacer denuncia outline: debates: Debates