From 79fb497bfbe5a5279edb1642c99e031fd18e855f Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 19 Jul 2017 17:03:19 +0200 Subject: [PATCH] adds active class on login items menu --- app/assets/stylesheets/layout.scss | 8 ++++++++ app/views/devise/menu/_login_items.html.erb | 16 ++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 30aaf1bfd..9ac0f2549 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -533,6 +533,14 @@ header { } } +.top-bar-right { + + .active { + font-weight: bold; + text-decoration: underline; + } +} + .submenu { border-bottom: 1px solid $border; clear: both; diff --git a/app/views/devise/menu/_login_items.html.erb b/app/views/devise/menu/_login_items.html.erb index ea2c6a44c..ac2f7e33c 100644 --- a/app/views/devise/menu/_login_items.html.erb +++ b/app/views/devise/menu/_login_items.html.erb @@ -12,12 +12,20 @@ <% end %>
  • - <%= link_to t("layouts.header.my_activity_link"), - user_path(current_user), rel: "nofollow" %> + <%= layout_menu_link_to t("layouts.header.my_activity_link"), + user_path(current_user), + controller_name == 'users', + rel: "nofollow", + title: t("shared.go_to_page") + + t("layouts.header.my_activity_link") %>
  • - <%= link_to t("layouts.header.my_account_link"), - account_path, rel: "nofollow" %> + <%= layout_menu_link_to t("layouts.header.my_account_link"), + account_path, + controller_name == 'account', + rel: "nofollow", + title: t("shared.go_to_page") + + t("layouts.header.my_account_link") %>
  • <%= link_to t("devise_views.menu.login_items.logout"),