diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/fragments/accountInfos.scala.html | 46 | ||||
-rw-r--r-- | app/views/fragments/branding/ebeLogo.scala.html (renamed from app/views/fragments/ebeLogo.scala.html) | 0 | ||||
-rw-r--r-- | app/views/fragments/branding/ebeSlogan.scala.html (renamed from app/views/fragments/ebeSlogan.scala.html) | 0 | ||||
-rw-r--r-- | app/views/fragments/branding/pepalLogo.scala.html (renamed from app/views/fragments/pepalLogo.scala.html) | 0 | ||||
-rw-r--r-- | app/views/fragments/branding/pepalSlogan.scala.html (renamed from app/views/fragments/pepalSlogan.scala.html) | 0 | ||||
-rw-r--r-- | app/views/fragments/forms/globalErrors.scala.html | 7 | ||||
-rw-r--r-- | app/views/fragments/forms/inputField.scala.html | 10 | ||||
-rw-r--r-- | app/views/fragments/forms/textarea.scala.html | 8 | ||||
-rw-r--r-- | app/views/pages/ebeHomepage.scala.html | 10 | ||||
-rw-r--r-- | app/views/pages/loginForm.scala.html | 27 | ||||
-rw-r--r-- | app/views/pages/pepalHomepage.scala.html | 8 | ||||
-rw-r--r-- | app/views/templates/ebe.scala.html | 4 | ||||
-rw-r--r-- | app/views/templates/main.scala.html | 20 | ||||
-rw-r--r-- | app/views/templates/pepal.scala.html | 4 |
14 files changed, 108 insertions, 36 deletions
diff --git a/app/views/fragments/accountInfos.scala.html b/app/views/fragments/accountInfos.scala.html index 711fb40..8fb0aab 100644 --- a/app/views/fragments/accountInfos.scala.html +++ b/app/views/fragments/accountInfos.scala.html | |||
@@ -1,14 +1,32 @@ | |||
1 | <a class="pure-button" href="#"> | 1 | @(accountData: Option[models.Views.Account] = None) |
2 | <i class="fa fa-sign-out fa-lg"></i> | 2 | |
3 | Logout | 3 | @accountData match { |
4 | </a> | 4 | case Some(account) => { |
5 | 5 | <a class="pure-button" href="@routes.Auth.logout()"> | |
6 | <a class="pure-button" href="#"> | 6 | <i class="fa fa-sign-out fa-lg"></i> |
7 | <i class="fa fa-money fa-lg"></i> | 7 | Logout |
8 | -400 000 € | 8 | </a> |
9 | </a> | 9 | |
10 | 10 | <a class="pure-button" href="#"> | |
11 | <a class="pure-button" href="#"> | 11 | <i class="fa fa-money fa-lg"></i> |
12 | <i class="fa fa-user fa-lg"></i> | 12 | @account.equity € |
13 | Mr. Kornada | 13 | </a> |
14 | </a> | 14 | |
15 | <a class="pure-button" href="#"> | ||
16 | <i class="fa fa-user fa-lg"></i> | ||
17 | @account.username | ||
18 | </a> | ||
19 | } | ||
20 | |||
21 | case None => { | ||
22 | <a class="pure-button" href="@routes.Auth.logout()"> | ||
23 | <i class="fa fa-pencil-square-o fa-lg"></i> | ||
24 | Sign up | ||
25 | </a> | ||
26 | |||
27 | <a class="pure-button" href="@routes.Auth.login()"> | ||
28 | <i class="fa fa-sign-in fa-lg"></i> | ||
29 | Log in | ||
30 | </a> | ||
31 | } | ||
32 | } | ||
diff --git a/app/views/fragments/ebeLogo.scala.html b/app/views/fragments/branding/ebeLogo.scala.html index f2b552a..f2b552a 100644 --- a/app/views/fragments/ebeLogo.scala.html +++ b/app/views/fragments/branding/ebeLogo.scala.html | |||
diff --git a/app/views/fragments/ebeSlogan.scala.html b/app/views/fragments/branding/ebeSlogan.scala.html index c0b5332..c0b5332 100644 --- a/app/views/fragments/ebeSlogan.scala.html +++ b/app/views/fragments/branding/ebeSlogan.scala.html | |||
diff --git a/app/views/fragments/pepalLogo.scala.html b/app/views/fragments/branding/pepalLogo.scala.html index a4b75ae..a4b75ae 100644 --- a/app/views/fragments/pepalLogo.scala.html +++ b/app/views/fragments/branding/pepalLogo.scala.html | |||
diff --git a/app/views/fragments/pepalSlogan.scala.html b/app/views/fragments/branding/pepalSlogan.scala.html index a6d6e69..a6d6e69 100644 --- a/app/views/fragments/pepalSlogan.scala.html +++ b/app/views/fragments/branding/pepalSlogan.scala.html | |||
diff --git a/app/views/fragments/forms/globalErrors.scala.html b/app/views/fragments/forms/globalErrors.scala.html new file mode 100644 index 0000000..98dad24 --- /dev/null +++ b/app/views/fragments/forms/globalErrors.scala.html | |||
@@ -0,0 +1,7 @@ | |||
1 | @(form: Form[_ <: Product]) | ||
2 | |||
3 | <div class="flash-message"> | ||
4 | @for(error <- form.globalErrors) { | ||
5 | <div class="error">@error.message</div> | ||
6 | } | ||
7 | </div> | ||
diff --git a/app/views/fragments/forms/inputField.scala.html b/app/views/fragments/forms/inputField.scala.html new file mode 100644 index 0000000..7de0e3b --- /dev/null +++ b/app/views/fragments/forms/inputField.scala.html | |||
@@ -0,0 +1,10 @@ | |||
1 | @(field: Field, inputType: String, label: String) | ||
2 | |||
3 | <input | ||
4 | class="pure-input-1 @if(field.hasErrors) {input-invalid}" | ||
5 | type="@inputType" | ||
6 | placeholder="@label" | ||
7 | name="@field.name" | ||
8 | id="@field.name" | ||
9 | value="@field.value" | ||
10 | > | ||
diff --git a/app/views/fragments/forms/textarea.scala.html b/app/views/fragments/forms/textarea.scala.html new file mode 100644 index 0000000..44904ca --- /dev/null +++ b/app/views/fragments/forms/textarea.scala.html | |||
@@ -0,0 +1,8 @@ | |||
1 | @(field: Field, label: String) | ||
2 | |||
3 | <textarea | ||
4 | class="pure-input-1 @if(field.hasErrors) {input-invalid}" | ||
5 | placeholder="@label" | ||
6 | name="@field.name" | ||
7 | id="@field.name" | ||
8 | >@field.value</textarea> | ||
diff --git a/app/views/pages/ebeHomepage.scala.html b/app/views/pages/ebeHomepage.scala.html index da1fb08..d4fe80a 100644 --- a/app/views/pages/ebeHomepage.scala.html +++ b/app/views/pages/ebeHomepage.scala.html | |||
@@ -1,6 +1,6 @@ | |||
1 | @()(implicit flash: Flash) | 1 | @()(implicit request : AuthRequest[AnyContent], flash: Flash, token: play.filters.csrf.CSRF.Token) |
2 | 2 | ||
3 | @templates.ebe("eBé") { | 3 | @templates.ebe("eBé")(request.account) { |
4 | 4 | ||
5 | <div class="action-buttons pure-g"> | 5 | <div class="action-buttons pure-g"> |
6 | @fragments.ebeMainActions() | 6 | @fragments.ebeMainActions() |
@@ -13,7 +13,7 @@ | |||
13 | <div class="l-box"> | 13 | <div class="l-box"> |
14 | <h3 class="information-head">Get started today</h3> | 14 | <h3 class="information-head">Get started today</h3> |
15 | <p> | 15 | <p> |
16 | With @fragments.ebeLogo(), the leading online auction platform, buy or sell items in a few clicks! | 16 | With @fragments.branding.ebeLogo(), the leading online auction platform, buy or sell items in a few clicks! |
17 | </p> | 17 | </p> |
18 | </div> | 18 | </div> |
19 | </div> | 19 | </div> |
@@ -22,7 +22,7 @@ | |||
22 | <div class="l-box"> | 22 | <div class="l-box"> |
23 | <h3 class="information-head">Buy and sell with confidence</h3> | 23 | <h3 class="information-head">Buy and sell with confidence</h3> |
24 | <p> | 24 | <p> |
25 | @fragments.ebeLogo() guarantees all transactions for both buyers and sellers. | 25 | @fragments.branding.ebeLogo() guarantees all transactions for both buyers and sellers. |
26 | </p> | 26 | </p> |
27 | </div> | 27 | </div> |
28 | </div> | 28 | </div> |
@@ -40,7 +40,7 @@ | |||
40 | <div class="l-box"> | 40 | <div class="l-box"> |
41 | <h3 class="information-head">Secure transactions</h3> | 41 | <h3 class="information-head">Secure transactions</h3> |
42 | <p> | 42 | <p> |
43 | With @fragments.ebeLogo(), you are not required to give any personal information to any buyer or seller. | 43 | With @fragments.branding.ebeLogo(), you are not required to give any personal information to any buyer or seller. |
44 | </p> | 44 | </p> |
45 | </div> | 45 | </div> |
46 | </div> | 46 | </div> |
diff --git a/app/views/pages/loginForm.scala.html b/app/views/pages/loginForm.scala.html new file mode 100644 index 0000000..5e4d8e5 --- /dev/null +++ b/app/views/pages/loginForm.scala.html | |||
@@ -0,0 +1,27 @@ | |||
1 | @(loginForm: Form[LoginData])(implicit flash: Flash, token: play.filters.csrf.CSRF.Token) | ||
2 | |||
3 | @templates.ebe("Log in")() { | ||
4 | |||
5 | <div class="pure-g"> | ||
6 | <div class="pure-u-1 pure-u-lg-1-3 centered"> | ||
7 | |||
8 | <h2>Log in</h2> | ||
9 | |||
10 | @views.html.fragments.forms.globalErrors(loginForm) | ||
11 | |||
12 | @helper.form(action = routes.Auth.loginSubmit(), 'class -> "pure-form") { | ||
13 | |||
14 | @helper.CSRF.formField | ||
15 | |||
16 | <fieldset class="pure-group"> | ||
17 | @views.html.fragments.forms.inputField(loginForm("username"), "text", "Username") | ||
18 | @views.html.fragments.forms.inputField(loginForm("password"), "password", "Password") | ||
19 | </fieldset> | ||
20 | |||
21 | <button type="submit" class="pure-button pure-input-1 pure-button-primary">Log in</button> | ||
22 | } | ||
23 | |||
24 | </div> | ||
25 | </div> | ||
26 | |||
27 | } | ||
diff --git a/app/views/pages/pepalHomepage.scala.html b/app/views/pages/pepalHomepage.scala.html index b4a8e9c..9f4b227 100644 --- a/app/views/pages/pepalHomepage.scala.html +++ b/app/views/pages/pepalHomepage.scala.html | |||
@@ -1,6 +1,6 @@ | |||
1 | @()(implicit flash: Flash) | 1 | @()(implicit request : AuthRequest[AnyContent], flash: Flash, token: play.filters.csrf.CSRF.Token) |
2 | 2 | ||
3 | @templates.pepal("PéPal") { | 3 | @templates.pepal("PéPal")(request.account) { |
4 | 4 | ||
5 | <div class="action-buttons pure-g"> | 5 | <div class="action-buttons pure-g"> |
6 | @fragments.pepalMainActions() | 6 | @fragments.pepalMainActions() |
@@ -13,7 +13,7 @@ | |||
13 | <div class="l-box"> | 13 | <div class="l-box"> |
14 | <h3 class="information-head">Get started today</h3> | 14 | <h3 class="information-head">Get started today</h3> |
15 | <p> | 15 | <p> |
16 | With @fragments.pepalLogo(), the leading online payment solution, buy or sell items on the web in a few clicks! | 16 | With @fragments.branding.pepalLogo(), the leading online payment solution, buy or sell items on the web in a few clicks! |
17 | </p> | 17 | </p> |
18 | </div> | 18 | </div> |
19 | </div> | 19 | </div> |
@@ -40,7 +40,7 @@ | |||
40 | <div class="l-box"> | 40 | <div class="l-box"> |
41 | <h3 class="information-head">Secure transactions</h3> | 41 | <h3 class="information-head">Secure transactions</h3> |
42 | <p> | 42 | <p> |
43 | With @fragments.pepalLogo(), you are not required to give any personal information to any buyer or seller. | 43 | With @fragments.branding.pepalLogo(), you are not required to give any personal information to any buyer or seller. |
44 | </p> | 44 | </p> |
45 | </div> | 45 | </div> |
46 | </div> | 46 | </div> |
diff --git a/app/views/templates/ebe.scala.html b/app/views/templates/ebe.scala.html index 2bab310..8e8fc8e 100644 --- a/app/views/templates/ebe.scala.html +++ b/app/views/templates/ebe.scala.html | |||
@@ -1,3 +1,3 @@ | |||
1 | @(title: String)(content: Html)(implicit flash: Flash) | 1 | @(title: String)(accountData: Option[models.Views.Account] = None)(content: Html)(implicit flash: Flash, token: play.filters.csrf.CSRF.Token) |
2 |