header.top-menu
  .toggle-side-menu
    span
  .menu-content
    section.main-buttons
      = link_to image_tag('icons/logo-small.png'), supplier_root_path, class: 'top-menu-root'
      = link_to t('supplier.top_menu.menu'), "/supplier#/menu", class: 'top-menu-menu'
      /= link_to ProductCategory.model_name.human_plural, suppliers_product_categories_path, data: {t: 'models.plural.product_category'}, class: 'top-menu-product_categories'
      /= link_to Product.model_name.human_plural, suppliers_products_path, data: {t: 'models.plural.product'}, class: 'top-menu-products'
      = link_to Section.model_name.human_plural, "/supplier#/sections", data: {t: 'models.plural.section'}, class: 'top-menu-sections'
      = link_to Table.model_name.human_plural, "/supplier#/tables", data: {t: 'models.plural.table'}, class: 'top-menu-tables'
      = link_to List.model_name.human_plural, "/supplier#/lists", data: {t: 'models.plural.list'}, class: 'top-menu-lists'
    section.extra-info
      .supplier-info-row
        .supplier-name= current_supplier.name.presence || current_supplier.email
        .table-number
      .supplier-info-row
        .counter.supplier-orders-placed-count
          span.supplier-orders-placed-count-number= current_supplier.orders_placed_count
          span.supplier-orders-placed-count-icon
        .counter.supplier-orders-in-process-count
          span.supplier-orders-in-process-count-number= current_supplier.orders_in_process_count
          span.supplier-orders-in-process-count-icon
aside.side-menu
  ul
    li.title: h3 Menu
/.navbar.navbar-fixed-top.navbar-inverse
  .navbar-inner
    .container
      a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse"
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.brand href=supplier_root_path = image_tag 'icons/logo-small.png', alt: application_title
      ul.nav.pull-right
        li.dropdown
          a.dropdown-toggle href="#" data-toggle="dropdown"
            = current_supplier.name.presence || current_supplier.email
            b.caret
            ul.dropdown-menu
              - if current_supplier.open?
                li
                  = form_tag supplier_mark_as_closed_path do
                    = submit_tag t('supplier.close'), class: [:btn, 'btn-danger'], onClick: %|$(this).parents('form').submit()|
              li= link_to 'Settings', supplier_settings_path
              li= link_to 'Logout', destroy_employee_session_path, method: :delete
      .container.nav-collapse
        ul.nav#top-navigation-list
          //li= link_to t('supplier.menu.active_orders', orders: Order.model_name.human_plural), supplier_active_orders_path
          //li= link_to t('supplier.menu.active_lists', lists: List.model_name.human_plural), supplier_active_lists_path
          li= link_to ProductCategory.model_name.human_plural, suppliers_product_categories_path, data: {t: 'models.plural.product_category'}
          li= link_to Product.model_name.human_plural, suppliers_products_path, data: {t: 'models.plural.product'}
          li= link_to Section.model_name.human_plural, suppliers_sections_path, data: {t: 'models.plural.section'}
          li= link_to Table.model_name.human_plural, suppliers_tables_path, data: {t: 'models.plural.table'}
          li= link_to List.model_name.human_plural, suppliers_lists_path, data: {t: 'models.plural.list'}
