Support multiple messages and statuses

This commit is contained in:
Gregor Kleen 2017-10-12 02:13:42 +02:00
parent a401610263
commit 02c034b14a
2 changed files with 4 additions and 3 deletions

View File

@ -107,7 +107,7 @@ instance Yesod UniWorX where
defaultLayout widget = do
master <- getYesod
mmsg <- getMessage
mmsgs <- getMessages
muser <- maybeAuthPair
mcurrentRoute <- getCurrentRoute

View File

@ -31,8 +31,9 @@
<li .active>#{title}
$maybe msg <- mmsg
<div .alert.alert-info #message>#{msg}
$forall (status, msg) <- mmsgs
$with status' <- bool (const "info") id (status == "") status
<div class="alert alert-#{status'}">#{msg}
$if (Just HomeR == mcurrentRoute)