From d79239a89c795035ea8d8a971aa9953d9e9a8e48 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Mon, 9 Feb 2015 00:14:18 +0100 Subject: Implement item pages and bids --- app/views/pages/sales/itemPage.scala.html | 120 ++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 app/views/pages/sales/itemPage.scala.html (limited to 'app/views') diff --git a/app/views/pages/sales/itemPage.scala.html b/app/views/pages/sales/itemPage.scala.html new file mode 100644 index 0000000..adfd5da --- /dev/null +++ b/app/views/pages/sales/itemPage.scala.html @@ -0,0 +1,120 @@ +@(item: Tables.Item, seller: Tables.User, bids: Seq[(Tables.Bid, Tables.User)], bidForm: Form[BidData])(implicit request: AuthRequest[AnyContent], flash: Flash, token: play.filters.csrf.CSRF.Token) + +@templates.ebe("Item page")(request.account) { + +
Item summary | +|
Item name | +@item.itemName | +
Short description | +@item.shortDesc | +
Detailed description | +
@item.longDesc | +
Bid | +|
Current price | ++ @if(bids.nonEmpty) { + @bids.head._1.offer + } else { + @item.initialPrice + } € + | +
+ @helper.form(action = routes.Sale.bidSubmit(item.uuid), 'class -> "pure-form") {
+
+ @helper.CSRF.formField
+
+
+
+ }
+
+ @views.html.fragments.forms.inputField(bidForm("offer"), "number", "Offer")
+
+
+
+
+
+ |
+
Bid history | +|
No bid | +|
@bid._2.username | +@bid._1.offer | +