mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Directing our form to the order populator
This commit is contained in:
@@ -37,7 +37,7 @@ shop
|
||||
font-size: 1.29em
|
||||
padding-right: 14px
|
||||
.custom.dropdown
|
||||
width: 250px
|
||||
width: 280px
|
||||
display: inline-block
|
||||
background: transparent
|
||||
border-width: 2px
|
||||
@@ -59,6 +59,8 @@ shop
|
||||
border: none
|
||||
th
|
||||
line-height: 50px
|
||||
.notes
|
||||
max-width: 300px
|
||||
td, th
|
||||
background: #fff
|
||||
border: 1px solid #cccccc
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module Spree
|
||||
class ProductSerializer < ActiveModel::Serializer
|
||||
attributes :id, :name, :description, :price
|
||||
attributes :id, :name, :description, :price, :permalink
|
||||
has_one :master
|
||||
has_one :supplier
|
||||
has_many :variants
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
%products{"ng-controller" => "ProductsCtrl"}
|
||||
%form.custom
|
||||
= form_for :order, :url => populate_orders_path, :class => "custom" do
|
||||
%input.button.right{type: :submit, value: "Check Out"}
|
||||
%table
|
||||
%thead
|
||||
%th{colspan: 2} Item
|
||||
%th Notes
|
||||
%th.notes Notes
|
||||
%th Variant
|
||||
%th QTY
|
||||
%th Bulk
|
||||
@@ -18,7 +18,7 @@
|
||||
%h5
|
||||
{{ product.name }}
|
||||
{{ product.supplier.name }}
|
||||
%td {{ product.description | truncate:250 }}
|
||||
%td.notes {{ product.description | truncate:250 }}
|
||||
%td {{ product.master.options_text }}
|
||||
%td
|
||||
%input{type: :number, value: 0, min: 0, name: "quantity_variant_{{product.master.id}}"}
|
||||
@@ -29,7 +29,7 @@
|
||||
Not available
|
||||
%td.price
|
||||
%small from
|
||||
$ {{ product.price }}
|
||||
${{ product.price }}
|
||||
%tr{"ng-repeat" => "variant in product.variants"}
|
||||
%td{colspan: 3}
|
||||
%td {{variant.options_text}}
|
||||
@@ -41,7 +41,6 @@
|
||||
%span{"ng-hide" => "product.group_buy"}
|
||||
Not available
|
||||
%td.price
|
||||
%small from
|
||||
${{ variant.price }}
|
||||
%small from ${{variant.price }}
|
||||
%input.button.right{type: :submit, value: "Check Out"}
|
||||
-#%pre {{ data.products | json }}
|
||||
|
||||
Reference in New Issue
Block a user