lib/rawbotz/views/order/non_remote.haml in rawbotz-0.1.4 vs lib/rawbotz/views/order/non_remote.haml in rawbotz-0.1.5
- old
+ new
@@ -6,43 +6,56 @@
- if @mail_preview.to_s != ""
%h2 Mail preview
%pre~ @mail_preview
%a{:href => "mailto:#{@supplier.email}?Subject=Order&body=%s" % URI::escape(@mail_preview).gsub(/&/,'%26')} Open mail
+ %br
%center
%form#non_remote_order.pure-form(action="" method="post")
%input(name="supplier_id" type="hidden" value="#{@supplier.id}")
%table.pure-table
%thead
%tr
%th Name
%th Qty
%th Packsize
- %th Stock/ Sales
+ %th Rough Avg. sales/ m
+ %th Stock
+ %th Chart
%tbody
- @products.find_each do |product|
%tr
%td
= product_link product
+ - if product.supplier_prod_name
+ %br
+ %small
+ = product.supplier_sku
+ = product.supplier_prod_name
%td
- = haml "widgets/_qty_wished_input".to_sym, locals: {product: product}
+ = haml "widgets/_qty_wished_input".to_sym, locals: {product: product, input_id_num: product.id}
%td
- if product.packsize.present?
= product.packsize
- else
%i.fa.fa-ban
%td
+ - if @monthly_sales
+ = @monthly_sales[product.product_id]
+ %td
+ = @stock[product.product_id]
+ %td
- stock_url = "/product/#{product.id}/stock_sales_plot"
%a.stock_show_action{:href => "", :data => {url: stock_url, product: product.name}}
Stock/Sales
%br
%center
%button.pure-button.pure-button-primary
%i.fa.fa-envelope
- Send me the mail!
+ Show me the mail!
-#%button#ajax_mailto.pure-button.pure-button-secondary
-# %i.fa.fa-envelope
-# Open mail
-#:javascript
-# $("#ajax_mailto").click(function(e){