Show Moderate link in topbar. Add menu icons.

This commit is contained in:
Christoph Haas 2021-02-24 19:18:19 +01:00
parent 117239ee87
commit ec43f47f92
3 changed files with 25 additions and 7 deletions

View file

@ -16,12 +16,18 @@ nav.top-bar
/ .top-bar-right
/ ul.menu
li.menu-text class=('active' if controller_name=='welcome' and action_name=='home')
a href="/" Home
a href="/"
i.fa.fa-home
span< Home
li.menu-text class=('active' if controller_name=='packages' and request.fullpath != packages_without_path)
a href="/packages" Browse
a href="/packages"
i.fa.fa-camera
span< Browse
/ TODO: highlights the "Browse" tab (even) when you click on Upload
li.menu-text class=('active' if request.fullpath == packages_without_path)
=link_to 'Upload', :packages_without
=link_to :packages_without
i.fa.fa-upload
span< Upload
//li.has-dropdown
//a href="#" Distributions
//ul.dropdown
@ -31,11 +37,16 @@ nav.top-bar
//li
//a href="#" Ubuntu
li.menu-text class=('active' if controller_name=='welcome' and action_name=='about')
a href="/about" About/Privacy
a href="/about"
i.fa.fa-info-circle
span< About/Privacy
// TODO: Check correct classes in Zurb/Foundation for top bar!
/- if user_signed_in? and current_user.is_admin?
- if user_signed_in? and current_user.is_admin? and Package.need_moderation.any?
li.menu-text
ul.menu.dropdown data-dropdown-menu=true
=link_to url_for(Package.need_moderation.first)
i.fa.fa-thumbs-up
span< Moderate
/ul.menu.dropdown data-dropdown-menu=true
li
a href='#' Admin
ul.menu