Showing active tab correctly in top bar

This commit is contained in:
Christoph Haas 2016-03-02 16:24:03 +01:00
parent 298ac56ac0
commit f0c265128b

View file

@ -17,7 +17,7 @@ header
section.top-bar-section section.top-bar-section
ul.right ul.right
li class=('active' if controller_name=='welcome') li class=('active' if controller_name=='welcome' and action_name=='home')
a href="/" Home a href="/" Home
li class=('active' if controller_name=='packages') li class=('active' if controller_name=='packages')
a href="/packages" Explore a href="/packages" Explore
@ -31,12 +31,12 @@ header
//a href="#" Debian //a href="#" Debian
//li //li
//a href="#" Ubuntu //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 a href="/about" About
li.divider li.divider
// TODO: Show link for admin/moderation view if admin is logged in // TODO: Show link for admin/moderation view if admin is logged in
li.has-form li.has-form
- if user_signed_in? - 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 - else
= link_to 'Login', new_user_session_path, class: 'button' = link_to 'Login', new_user_session_path, class: 'button'