summaryrefslogtreecommitdiff
path: root/Assistant/WebApp/SideBar.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/WebApp/SideBar.hs')
-rw-r--r--Assistant/WebApp/SideBar.hs18
1 files changed, 6 insertions, 12 deletions
diff --git a/Assistant/WebApp/SideBar.hs b/Assistant/WebApp/SideBar.hs
index 20fd09c2e..fd1f70038 100644
--- a/Assistant/WebApp/SideBar.hs
+++ b/Assistant/WebApp/SideBar.hs
@@ -36,24 +36,18 @@ sideBarDisplay = do
$(widgetFile "sidebar/main")
autoUpdate ident NotifierSideBarR (10 :: Int) (10 :: Int)
where
+ bootstrapclass :: AlertClass -> Text
bootstrapclass Activity = "alert-info"
bootstrapclass Warning = "alert"
bootstrapclass Error = "alert-error"
bootstrapclass Success = "alert-success"
bootstrapclass Message = "alert-info"
- renderalert (alertid, alert) = addalert
- alertid
- (alertClosable alert)
- (alertBlockDisplay alert)
- (bootstrapclass $ alertClass alert)
- (renderAlertHeader alert)
- (renderAlertMessage alert)
- (alertIcon alert)
-
- addalert :: AlertId -> Bool -> Bool -> Text -> Maybe Text -> Text -> Maybe String -> Widget
- addalert i closable block divclass heading message icon = do
- let alertid = show i
+ renderalert (aid, alert) = do
+ let alertid = show aid
+ let closable = alertClosable alert
+ let block = alertBlockDisplay alert
+ let divclass = bootstrapclass $ alertClass alert
$(widgetFile "sidebar/alert")
{- Called by client to get a sidebar display.