= haml "products/menu".to_sym %h1= @product.name %form.pure-form.pure-form-aligned(action="" method="post") %input(type="hidden" name="_method" value="put") %fieldset .pure-control-group %label(for="product_id") Product ID %input#product_id(type="text" readonly value="#{@product.product_id}") .pure-control-group %label(for="product_page") Product Page (Shop frontend) - frontend_url = Rawbotz::LocalShop.product_page_frontend(@product, settings.conf) %a(href="#{frontend_url}" target="blank") = frontend_url .pure-control-group %label(for="product_page") Product Page (Shop backend) - backend_url = Rawbotz::LocalShop.product_page_backend(@product, settings.conf) %a(href="#{backend_url}" target="blank") = backend_url .pure-control-group %label(for="supplier") Supplier = supplier_link @product.supplier .pure-control-group %label(for="supplier") Remote Product - if @product.remote_product.nil? %a(href="/product/#{@product.id}/link") Link to ... - else = remote_product_link @product .pure-control-group %label(for="packsize") Pack size = @product.packsize .pure-control-group %label(for="shelve") Shelve = @product.shelve_nr - if @product.supplier_sku != "" .pure-control-group %label(for="supplier_sku") Supplier SKU = @product.supplier_sku - if @product.supplier_prod_name != "" .pure-control-group %label(for="supplier_prod_name") Supplier Product Name = @product.supplier_prod_name %h2 Actions - if !@product.remote_product.present? = haml "widgets/_link".to_sym, locals: {local_product: @product, redirect_to: 'product'} %br = haml :"_hide_unhide_button", locals: {product: @product} - if @plot_data.any? .pure-g .pure-u-1-1 %h2 Stock and Sales Values (30 days) .pure-u-2-5 %table.pure-table.pure-table-striped %thead %tr %th Month %th Qty Sold %th Quarter %tbody - @sales_monthly.each_slice(3) do |sales| - sales.each do |s| %tr %td = Date::MONTHNAMES[s[0].month] = s[0].year %td=s[1] %td %tr(style="background-color: rgb(132,122,102);") %td(colspan="2") = Date::MONTHNAMES[sales[0][0].month] = sales[0][0].year \- = Date::MONTHNAMES[sales[-1][0].month] = sales[-1][0].year %td -#= sales.inspect = sales.inject(0) {|acc, s| acc + s[1].to_i } .pure-u-3-5 = haml :"product/_stock_sales_plot", locals: {plot_data: @plot_data, markers: @sales_monthly} -#%h2 Orders -#= product.order_items.order ... link