From f0c265128b157204b9239c104fcf5d1a1dd0467e Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Wed, 2 Mar 2016 16:24:03 +0100 Subject: [PATCH] Showing active tab correctly in top bar --- app/views/layouts/_topbar.slim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/_topbar.slim b/app/views/layouts/_topbar.slim index 1521a22..03572f6 100644 --- a/app/views/layouts/_topbar.slim +++ b/app/views/layouts/_topbar.slim @@ -17,7 +17,7 @@ header section.top-bar-section ul.right - li class=('active' if controller_name=='welcome') + li class=('active' if controller_name=='welcome' and action_name=='home') a href="/" Home li class=('active' if controller_name=='packages') a href="/packages" Explore @@ -31,12 +31,12 @@ header //a href="#" Debian //li //a href="#" Ubuntu - li class=('active' if controller_name=='about') + li class=('active' if controller_name=='welcome' and action_name=='about') a href="/about" About li.divider // TODO: Show link for admin/moderation view if admin is logged in li.has-form - if user_signed_in? - = link_to "#{current_user.email} logged in", destroy_user_session_path, :method => :delete, class: 'button' + = link_to "#{current_user.email} (Logout)", destroy_user_session_path, :method => :delete, class: 'button' - else = link_to 'Login', new_user_session_path, class: 'button'