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/fragments | |
parent | 9f6ba6c47e90640abb8203986acd1562fd48b84d (diff) | |
download | minibay-de24f5b788c1ae6307eb360877ea3ce61c8f7a6a.tar.gz |
Implement flash messages
Diffstat (limited to 'app/views/fragments')
-rw-r--r-- | app/views/fragments/flashBanner.scala.html | 13 |
1 files changed, 13 insertions, 0 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 | } | ||