= 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 = @product.supplier.try(:name) .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 %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 %thead %tr %th Date %th Qty in Stock %th Qty Sold %tbody - @plot_data.values.each do |s| %tr{:class => s[:stock].to_i <= 0 ? "empty-stock" : ""} %td= s[:label] %td= s[:stock] %td= s[:sales] .pure-u-3-5 = haml :"product/_stock_sales_plot", locals: {plot_data: @plot_data} -#%h2 Orders -#= product.order_items.order ... link