Sha256: dab3faa4f3406edaaf9337e5664bb601c670b2275d9c6c6f065aef4c1a7e8235

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 KB

Contents

= haml "products/menu".to_sym

%h1 Products by Supplier

#modal-plot.modal-plot

:javascript
  $(function() {
    $( "#tabs" ).tabs();
  });

#tabs
  %ul
    %li
      %a(href="#tab_all_products") All
    - @suppliers.each_with_index do |supplier, idx|
      %li
        %a(href="#tab_#{idx}")="#{supplier.name} (#{@products.supplied_by(supplier).count})"
    %li
      %a(href="#tab_no_supplier") [no supplier] (#{@products.where(supplier_id: nil).count})
    %li
      %a(href="#tab_hidden_products") Hidden (#{@products.all_hidden.count})
  #tab_all_products
    %h2 All Products
    = haml "products/table".to_sym, locals: {products: @products.all}
  - @suppliers.each_with_index do |supplier, idx|
    %div{id:"tab_#{idx}"}
      %h2 Products of #{supplier.name || "Unknown Supplier"}
      - if supplier == settings.supplier
        = haml "products/table_with_linking".to_sym, locals: {products: @products.supplied_by(supplier)}
      - else
        = haml "products/table".to_sym, locals: {products: @products.supplied_by(supplier)}
  #tab_no_supplier
    %h2 Products without supplier
    = haml "products/table".to_sym, locals: {products: @products.where(supplier_id: nil)}
  #tab_hidden_products
    %h2 Hidden Products
    = haml "products/table".to_sym, locals: {products: @products.all_hidden}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rawbotz-0.1.5 lib/rawbotz/views/products/index.haml
rawbotz-0.1.4 lib/rawbotz/views/products/index.haml
rawbotz-0.1.3 lib/rawbotz/views/products/index.haml