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

34 lines
1.5 KiB
Text
Raw Normal View History

2015-09-17 14:05:33 +02:00
%nav.navbar.navbar-inverse.navbar-fixed-top{role: "navigation"}
.container-fluid
/ Brand and toggle get grouped for better mobile display
.navbar-header
2015-09-19 11:05:43 +02:00
%button.navbar-toggle{data: { target: ".navbar-collapse", toggle: "collapse" } }
2015-09-17 14:05:33 +02:00
%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
2015-09-19 11:05:43 +02:00
= render 'layouts/session_button'
2015-09-17 14:05:33 +02:00
%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
2015-10-27 22:09:01 +01:00
%li= link_to "Barcodes", barcodes_path
%li
%p.navbar-text Logged in as #{current_user.name}
2015-09-17 14:05:33 +02:00
%li
%p.navbar-text
2016-02-02 17:50:22 +01:00
Balance:
= link_to euro_from_cents(current_user.balance), "https://zeus.ugent.be/tab/users/#{current_user.name}"
2015-09-17 14:05:33 +02:00
.visible-xs.navbar-form
2015-09-19 11:05:43 +02:00
= render 'layouts/session_button'