Product image and description handling
This commit is contained in:
@@ -1,17 +1,24 @@
|
||||
.row.menu-product-container
|
||||
if editMode
|
||||
.small-3.columns
|
||||
if editMode
|
||||
.row.menu-product-container
|
||||
.small-3.columns.name
|
||||
= input value=product.name
|
||||
= errors product.errors.name
|
||||
.small-3.columns
|
||||
.small-3.columns.price
|
||||
= edit-currency value=product.price validatePresence=true
|
||||
= errors product.errors.price
|
||||
.small-3.columns= input value=product.code
|
||||
.small-3.columns
|
||||
.small-3.columns.code= input value=product.code
|
||||
.small-3.columns.actions
|
||||
a.rollback-product-action{action "rollbackProduct"}: span
|
||||
a.destroy-product-action{action "destroyProduct" product}: span
|
||||
a.save-product-action{action "save"}: span
|
||||
else
|
||||
if showProduct
|
||||
.row.menu-product-container
|
||||
.medium-4.small-6.columns
|
||||
= view "upload-file" name="image" accept="image/*" file=product.image
|
||||
.medium-4.small-6.columns: img src=product.image_src
|
||||
.medium-4.small-6.columns= textarea value=product.description
|
||||
else
|
||||
if showProduct
|
||||
.row.menu-product-container
|
||||
.small-3.columns
|
||||
span= product.name
|
||||
= errors product.errors.name includeAttribute="product"
|
||||
@@ -19,4 +26,6 @@
|
||||
= currency product.price
|
||||
= errors product.errors.price includeAttribute="product"
|
||||
.small-3.columns: span= code_filter_display
|
||||
.small-3.columns: span.fa.fa-edit{action "makeEditable"}
|
||||
.small-3.columns
|
||||
span.fa.fa-edit{action "makeEditable"}
|
||||
img src=product.image_src
|
||||
|
||||
@@ -9,9 +9,9 @@ each product_category in sorted_product_categories
|
||||
span.title= product_category.name
|
||||
span.availability= product_category.availability_text
|
||||
a.edit-product-category-button{action "editProductCategory" product_category} href="#"
|
||||
a.add-product-product-category-button{action "addProduct" product_category} href="#": span
|
||||
a.add-product-product_category-button{action "addProduct" product_category} href="#": span
|
||||
each product in product_category.sorted_products
|
||||
= menu-product product=product code_filter=product_code_filter
|
||||
.row
|
||||
.small-12.columns
|
||||
a.button{action "newProductCategory"} href="#" = t 'product_category.new_button'
|
||||
a.new-product_category-button{action "newProductCategory"} href="#" = t 'product_category.new_button'
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
.form-row
|
||||
.form-row.name
|
||||
.form-label.half=t 'attributes.product_category.name'
|
||||
.form-field.half= input valueBinding="model.name"
|
||||
.row
|
||||
.small-12.medium-6.columns
|
||||
unless model.supplier.week_starts_on_monday
|
||||
.form-row
|
||||
.form-row.sunday
|
||||
.form-label.half= t 'date.day_name.sunday'
|
||||
.form-field.half= view "boolean-switch" value=model.active_on_sunday
|
||||
.form-row
|
||||
.form-row.monday
|
||||
.form-label.half= t 'date.day_name.monday'
|
||||
.form-field.half= view "boolean-switch" value=model.active_on_monday
|
||||
.form-row
|
||||
.form-row.tuesday
|
||||
.form-label.half= t 'date.day_name.tuesday'
|
||||
.form-field.half= view "boolean-switch" value=model.active_on_tuesday
|
||||
.form-row
|
||||
.form-row.wednesday
|
||||
.form-label.half= t 'date.day_name.wednesday'
|
||||
.form-field.half= view "boolean-switch" value=model.active_on_wednesday
|
||||
.form-row
|
||||
.form-row.thursday
|
||||
.form-label.half= t 'date.day_name.thursday'
|
||||
.form-field.half= view "boolean-switch" value=model.active_on_thursday
|
||||
.form-row
|
||||
.form-row.friday
|
||||
.form-label.half= t 'date.day_name.friday'
|
||||
.form-field.half= view "boolean-switch" value=model.active_on_friday
|
||||
.form-row
|
||||
.form-row.saturday
|
||||
.form-label.half= t 'date.day_name.saturday'
|
||||
.form-field.half= view "boolean-switch" value=model.active_on_saturday
|
||||
if model.supplier.week_starts_on_monday
|
||||
.form-row
|
||||
.form-row.sunday
|
||||
.form-label.half= t 'date.day_name.sunday'
|
||||
.form-field.half= view "boolean-switch" valueBinding=model.active_on_sunday
|
||||
.small-12.medium-6.columns
|
||||
|
||||
Reference in New Issue
Block a user