web: ?sidebar= hides the sidebar, like ?sidebar=0
This commit is contained in:
parent
ef1bd24edc
commit
e70c7123b7
@ -228,7 +228,12 @@ shouldShowSidebar :: Handler Bool
|
|||||||
shouldShowSidebar = do
|
shouldShowSidebar = do
|
||||||
msidebarparam <- lookupGetParam "sidebar"
|
msidebarparam <- lookupGetParam "sidebar"
|
||||||
msidebarcookie <- lookup "showsidebar" . reqCookies <$> getRequest
|
msidebarcookie <- lookup "showsidebar" . reqCookies <$> getRequest
|
||||||
return $ maybe (msidebarcookie /= Just "0") (/="0") msidebarparam
|
return $
|
||||||
|
let disablevalues = ["","0"]
|
||||||
|
in maybe
|
||||||
|
(not $ msidebarcookie `elem` map Just disablevalues)
|
||||||
|
(not . (`elem` disablevalues))
|
||||||
|
msidebarparam
|
||||||
|
|
||||||
-- | Update our copy of the journal if the file changed. If there is an
|
-- | Update our copy of the journal if the file changed. If there is an
|
||||||
-- error while reloading, keep the old one and return the error, and set a
|
-- error while reloading, keep the old one and return the error, and set a
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user