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.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/Assistant/WebApp/SideBar.hs b/Assistant/WebApp/SideBar.hs
index 4373b5a5b..e0c31c949 100644
--- a/Assistant/WebApp/SideBar.hs
+++ b/Assistant/WebApp/SideBar.hs
@@ -22,9 +22,13 @@ import Data.Text (Text)
import qualified Data.Map as M
import Control.Concurrent
-sideBarDisplay :: Widget
-sideBarDisplay = do
+sideBarDisplay :: Maybe Widget -> Widget
+sideBarDisplay onsidebar = do
let content = do
+ {- If a widget was passed to include on the sidebar, display
+ - it above alerts. -}
+ maybe noop id onsidebar
+
{- Any yesod message appears as the first alert. -}
maybe noop rendermessage =<< lift getMessage
@@ -83,7 +87,7 @@ getSideBarR nid = do
- to avoid slowing down user actions like closing alerts. -}
liftIO $ threadDelay 100000
- page <- widgetToPageContent sideBarDisplay
+ page <- widgetToPageContent $ sideBarDisplay Nothing
hamletToRepHtml $ [hamlet|^{pageBody page}|]
{- Called by the client to close an alert. -}