-# Generated with help of: -# https://getbootstrap.com/docs/4.1/examples/dashboard/# -# https://fontawesome.com/v4.7.0/icons/ %nav.navbar.navbar-dark.fixed-top.bg-dark.flex-md-nowrap.p-0.shadow.navbar-expand-md -#= link_to(Rails.configuration.settings['shopapp_name'], '/', class: 'navbar-brand col-3 col-md-2 mr-0') = link_to('/', class: 'navbar-brand col-3 col-md-2 mr-0') do = image_tag company_logo_path_defined, style: "padding-bottom: 3px;" %span= Rails.configuration.settings['shopapp_name'] %button.navbar-toggler(type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation") %span.navbar-toggler-icon #navbarSupportedContent.collapse.navbar-collapse.navbar-toggleable-xs - unless controller.class.do_hide_search_for_this_controller || controller.do_hide_search_for_this_action .w-75.mx-md-auto.mt-4.mt-md-0.ml-3 %form(action=search_path) .input-group.input-group-sm %input#search.form-control(name="search" placeholder="Search" type="text" value=@search) .input-group-append %button.btn.btn-outline-light(type="submit") %i.fa.fa-search.mx-4(aria-hidden="true") %ul.navbar-nav.ml-auto = render 'layouts/header_menu' %li.nav-item.dropdown.ml-3 %a#navbarDropdown.nav-link.dropdown-toggle(href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false") %i.fa.fa-th(aria-hidden="true") .dropdown-menu.dropdown-menu-right(aria-labelledby="navbarDropdown") -(@current_user_json_hash['company']['apps'] || []).each do |app| - if app['home'].present? %a.dropdown-item(href="#{app['home']}")=app['name'] %li.nav-item.dropdown.ml-md-2.ml-3.mr-3 %a#navbarDropdown.nav-link.dropdown-toggle(href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false") %i.fa.fa-user(aria-hidden="true") .dropdown-menu.dropdown-menu-right(aria-labelledby="navbarDropdown") .dropdown-header=@current_user_json_hash['email'] .dropdown-header %strong Company: =@current_user_json_hash['company']['name'] .dropdown-divider - (@current_user_json_hash['memberships'] || []).reject { |c| @current_user_json_hash['company']['code'] == c['code'] }.each do |c| = link_to(change_company_path(c['code']), method: :post, :class => 'dropdown-item') do Switch company to: #{c['name']} = link_to(logout_path, method: :delete, :class => 'dropdown-item') do Logout .container-fluid - if lookup_context.exists? 'sidebar', 'layouts', true .row %nav.col-md-2.d-none.d-md-block.bg-light.sidebar .sidebar-sticky = render 'layouts/sidebar' %main.col-md-10.ml-sm-auto.col-lg-10.px-4.mt-2{:role => "main"} - if notice .alert.alert-secondary.mt-3(role="alert")= notice - if alert .alert.alert-danger.mt-3(role="alert")= alert = yield - else .row %main.col.px-4.mt-2{:role => "main"} - if notice .alert.alert-secondary.mt-3(role="alert")= notice - if alert .alert.alert-danger.mt-3(role="alert")= alert = yield