diff options
author | Pacien TRAN-GIRARD | 2015-02-05 20:37:05 +0100 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2015-02-05 20:37:05 +0100 |
commit | de24f5b788c1ae6307eb360877ea3ce61c8f7a6a (patch) | |
tree | 7b2e454edb9901ae7cc2386659cff92bfb6c8486 /app/views | |
parent | 9f6ba6c47e90640abb8203986acd1562fd48b84d (diff) | |
download | minibay-de24f5b788c1ae6307eb360877ea3ce61c8f7a6a.tar.gz |
Implement flash messages
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/fragments/flashBanner.scala.html | 13 | ||||
-rw-r--r-- | app/views/pages/ebeHomepage.scala.html | 2 | ||||
-rw-r--r-- | app/views/pages/pepalHomepage.scala.html | 2 | ||||
-rw-r--r-- | app/views/templates/ebe.scala.html | 2 | ||||
-rw-r--r-- | app/views/templates/main.scala.html | 4 | ||||
-rw-r--r-- | app/views/templates/pepal.scala.html | 2 |
6 files changed, 22 insertions, 3 deletions
diff --git a/app/views/fragments/flashBanner.scala.html b/app/views/fragments/flashBanner.scala.html new file mode 100644 index 0000000..41766f9 --- /dev/null +++ b/app/views/fragments/flashBanner.scala.html | |||
@@ -0,0 +1,13 @@ | |||
1 | @()(implicit flash:Flash) | ||
2 | |||
3 | @displayFlash(flashType: String) = { | ||
4 | @for(message <- flash.get(flashType)) { | ||
5 | <div class="@flashType"> | ||
6 | @message | ||
7 | </div> | ||
8 | } | ||
9 | } | ||
10 | |||
11 | @for(flashType <- List("success", "info", "warning", "error")) { | ||
12 | @displayFlash(flashType) | ||
13 | } | ||
diff --git a/app/views/pages/ebeHomepage.scala.html b/app/views/pages/ebeHomepage.scala.html index bf11462..da1fb08 100644 --- a/app/views/pages/ebeHomepage.scala.html +++ b/app/views/pages/ebeHomepage.scala.html | |||
@@ -1,3 +1,5 @@ | |||
1 | @()(implicit flash: Flash) | ||
2 | |||
1 | @templates.ebe("eBé") { | 3 | @templates.ebe("eBé") { |
2 | 4 | ||
3 | <div class="action-buttons pure-g"> | 5 | <div class="action-buttons pure-g"> |
diff --git a/app/views/pages/pepalHomepage.scala.html b/app/views/pages/pepalHomepage.scala.html index 6eb7070..b4a8e9c 100644 --- a/app/views/pages/pepalHomepage.scala.html +++ b/app/views/pages/pepalHomepage.scala.html | |||
@@ -1,3 +1,5 @@ | |||
1 | @()(implicit flash: Flash) | ||
2 | |||
1 | @templates.pepal("PéPal") { | 3 | @templates.pepal("PéPal") { |
2 | 4 | ||
3 | <div class="action-buttons pure-g"> | 5 | <div class="action-buttons pure-g"> |
diff --git a/app/views/templates/ebe.scala.html b/app/views/templates/ebe.scala.html index dbc1a88..2bab310 100644 --- a/app/views/templates/ebe.scala.html +++ b/app/views/templates/ebe.scala.html | |||
@@ -1,3 +1,3 @@ | |||
1 | @(title: String)(content: Html) | 1 | @(title: String)(content: Html)(implicit flash: Flash) |
2 | 2 | ||
3 | @templates.main{@fragments.ebeLogo()}{@fragments.ebeSlogan()}(title)(content) | 3 | @templates.main{@fragments.ebeLogo()}{@fragments.ebeSlogan()}(title)(content) |
diff --git a/app/views/templates/main.scala.html b/app/views/templates/main.scala.html index dadfc03..278b205 100644 --- a/app/views/templates/main.scala.html +++ b/app/views/templates/main.scala.html | |||
@@ -1,4 +1,4 @@ | |||
1 | @(logo: Html)(slogan: Html)(title: String)(content: Html) | 1 | @(logo: Html)(slogan: Html)(title: String)(content: Html)(implicit flash: Flash) |
2 | 2 | ||
3 | <!DOCTYPE html> | 3 | <!DOCTYPE html> |
4 | 4 | ||
@@ -50,6 +50,8 @@ | |||
50 | </div> | 50 | </div> |
51 | </header> | 51 | </header> |
52 | 52 | ||
53 | <div class="flash-message">@fragments.flashBanner()</div> | ||
54 | |||
53 | <div class="content">@content</div> | 55 | <div class="content">@content</div> |
54 | 56 | ||
55 | <footer> | 57 | <footer> |
diff --git a/app/views/templates/pepal.scala.html b/app/views/templates/pepal.scala.html index e71482d..ec6d5dd 100644 --- a/app/views/templates/pepal.scala.html +++ b/app/views/templates/pepal.scala.html | |||
@@ -1,3 +1,3 @@ | |||
1 | @(title: String)(content: Html) | 1 | @(title: String)(content: Html)(implicit flash: Flash) |
2 | 2 | ||
3 | @templates.main{@fragments.pepalLogo()}{@fragments.pepalSlogan()}(title)(content) | 3 | @templates.main{@fragments.pepalLogo()}{@fragments.pepalSlogan()}(title)(content) |