forked from antweiss/oto-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,33 @@ | ||
extends layout | ||
|
||
block content | ||
h1= title | ||
p Welcome to #{title} | ||
p Register products: | ||
form(name="register", action="/register", method="post") | ||
span.label productName | ||
span.label productName | ||
input(type="text", name="Product_name", id="pname") | ||
span.label Price | ||
input(type="number", name="price", id="price") | ||
span.label Price | ||
input(type="number", name="price", id="price" step="0.01") | ||
input(type="submit", name="register", value="register") | ||
div | ||
|
||
br | ||
= '\n' | ||
p Choose product: | ||
form(action="/order", method="post") | ||
if products | ||
each product in products | ||
input(type='radio', name='chosen', value=product.name) | ||
| #{product.name} #{product.price} | ||
span.label Desired Amount | ||
input(type="number", name="amount", id="amount", value=0) | ||
br | ||
input(type='radio', name='chosen', value=product.name) | ||
| #{product.name} #{product.price} | ||
br | ||
br | ||
span.label Insert Desired Amount: | ||
input(type="number", name="amount", id="amount", value=0) | ||
input(type="submit", name="order", value="order now") | ||
|
||
= '\n' | ||
p Your orders: | ||
ul | ||
each order in orders | ||
li= order.id + ':' + order.amount + ':' + order.totalSum | ||
|
||
- var prodname = "undef" | ||
each product in products | ||
if product._id == order.productId | ||
- prodname = product.name | ||
li= "Product: " + prodname + '| amount :' + order.amount + '| total :' + order.totalSum + "| link :" + order._links.self.href |