summaryrefslogtreecommitdiff
path: root/Assistant
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant')
-rw-r--r--Assistant/WebApp.hs8
-rw-r--r--Assistant/WebApp/SideBar.hs1
2 files changed, 8 insertions, 1 deletions
diff --git a/Assistant/WebApp.hs b/Assistant/WebApp.hs
index 5bb2339b3..4418a4d98 100644
--- a/Assistant/WebApp.hs
+++ b/Assistant/WebApp.hs
@@ -165,3 +165,11 @@ webAppFormAuthToken :: Widget
webAppFormAuthToken = do
webapp <- lift getYesod
[whamlet|<input type="hidden" name="auth" value="#{secretToken webapp}">|]
+
+{- A button with an icon, and maybe label, that can be clicked to perform
+ - some action.
+ - With javascript, clicking it POSTs the Route, and remains on the same
+ - page.
+ - With noscript, clicking it GETs the Route. -}
+actionButton :: Route WebApp -> (Maybe String) -> String -> String -> Widget
+actionButton route label buttonclass iconclass = $(widgetFile "actionbutton")
diff --git a/Assistant/WebApp/SideBar.hs b/Assistant/WebApp/SideBar.hs
index 509c5fa2f..d44c75d43 100644
--- a/Assistant/WebApp/SideBar.hs
+++ b/Assistant/WebApp/SideBar.hs
@@ -53,7 +53,6 @@ sideBarDisplay = do
addalert :: AlertId -> Bool -> Bool -> Text -> Maybe Text -> Text -> Maybe String -> Widget
addalert i closable block divclass heading message icon = do
let alertid = show i
- let closealert = CloseAlert i
$(widgetFile "sidebar/alert")
{- Called by client to get a sidebar display.