Sha256: beb4273beb17076ed5ae7f0b779a7286c285d848bb2929dccca9c6ede7bf8ba4
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
= haml "products/menu".to_sym %h1 Products by Supplier :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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rawbotz-0.1.2 | lib/rawbotz/views/products/index.haml |