From 330d7a719800cded4385c633370f782571891f49 Mon Sep 17 00:00:00 2001
From: Pacien TRAN-GIRARD
Date: Sun, 8 Feb 2015 22:31:17 +0100
Subject: Implement sell action
---
app/views/pages/sales/currentSales.scala.html | 4 ++--
app/views/pages/sales/sellForm.scala.html | 34 +++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 2 deletions(-)
create mode 100644 app/views/pages/sales/sellForm.scala.html
(limited to 'app/views/pages/sales')
diff --git a/app/views/pages/sales/currentSales.scala.html b/app/views/pages/sales/currentSales.scala.html
index 30cea78..bb1851c 100644
--- a/app/views/pages/sales/currentSales.scala.html
+++ b/app/views/pages/sales/currentSales.scala.html
@@ -26,9 +26,9 @@
@for(sale <- sales) {
- @sale.endDate |
+ @sale.endDate.get |
@sale.itemName |
- @if(sale.bestOffer.isDefined) {@sale.bestOffer} else {sale.initialPrice} € |
+ @if(sale.bestOffer.isDefined) {@sale.bestOffer} else {@sale.initialPrice} € |
}
diff --git a/app/views/pages/sales/sellForm.scala.html b/app/views/pages/sales/sellForm.scala.html
new file mode 100644
index 0000000..d3988ba
--- /dev/null
+++ b/app/views/pages/sales/sellForm.scala.html
@@ -0,0 +1,34 @@
+@(saleForm: Form[SaleData])(implicit request: AuthRequest[AnyContent], flash: Flash, token: play.filters.csrf.CSRF.Token)
+
+@templates.ebe("Sell")(request.account) {
+
+
+
+
+
Sell a new item
+
+ @views.html.fragments.forms.globalErrors(saleForm)
+
+ @helper.form(action = routes.Sale.sellSubmit(), 'class -> "pure-form pure-form-stacked") {
+
+ @helper.CSRF.formField
+
+
+
+
+
+
+
+ }
+
+
+
+
+}
--
cgit v1.2.3