tap/app/views/layouts/_header.html.haml

36 lines
1.6 KiB
Text

%nav.navbar.navbar-inverse.navbar-fixed-top{role: "navigation"}
.container-fluid
/ Brand and toggle get grouped for better mobile display
.navbar-header
%button.navbar-toggle{data: { target: ".navbar-collapse", toggle: "collapse" } }
%span.icon-bar
%span.icon-bar
%span.icon-bar
= link_to "Tap", root_path, class: "navbar-brand nav-logo"
/ Collect the nav links, forms, and other content for toggling
- unless current_user && current_user.koelkast?
.collapse.navbar-collapse
.hidden-xs.navbar-form.navbar-right
= render 'layouts/session_button'
%ul.nav.navbar-nav.navbar-right
%li= mail_to "tab@zeus.ugent.be", "Send feedback"
- if user_signed_in?
- if can? :manage, :all
%li.dropdown
%a.dropdown-toggle{"aria-expanded" => "false", "data-toggle" => "dropdown", href: "#", role: "button"}
Products
%span.caret
%ul.dropdown-menu{role: "menu"}
%li= link_to "List", products_path
%li= link_to "Add product" , barcode_products_path
%li.dropdown
%a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
Logged in as #{current_user.name}
%b.caret
%ul.dropdown-menu
%li= link_to "Edit profile", edit_user_path(current_user)
%li
%p.navbar-text
Balance: #{euro_from_cents(current_user.balance)}
.visible-xs.navbar-form
= render 'layouts/session_button'