tap/app/views/layouts/_header.html.haml
2016-02-04 23:38:10 +01:00

34 lines
1.5 KiB
Plaintext

%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
- 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= link_to "Barcodes", barcodes_path
%li
%p.navbar-text Logged in as #{current_user.name}
%li
%p.navbar-text
Balance:
= link_to euro_from_cents(current_user.balance), "https://zeus.ugent.be/tab/users/#{current_user.name}"
.visible-xs.navbar-form
= render 'layouts/session_button'