webapp: Check annex.version.
This commit is contained in:
parent
2430302379
commit
9c20185f55
9 changed files with 80 additions and 52 deletions
|
@ -52,16 +52,19 @@ page title navbaritem content = customPage navbaritem $ do
|
|||
customPage :: Maybe NavBarItem -> Widget -> Handler Html
|
||||
customPage navbaritem content = do
|
||||
webapp <- getYesod
|
||||
navbar <- map navdetails <$> selectNavBar
|
||||
pageinfo <- widgetToPageContent $ do
|
||||
addStylesheet $ StaticR css_bootstrap_css
|
||||
addStylesheet $ StaticR css_bootstrap_responsive_css
|
||||
addScript $ StaticR jquery_full_js
|
||||
addScript $ StaticR js_bootstrap_dropdown_js
|
||||
addScript $ StaticR js_bootstrap_modal_js
|
||||
addScript $ StaticR js_bootstrap_collapse_js
|
||||
$(widgetFile "page")
|
||||
giveUrlRenderer $(Hamlet.hamletFile $ hamletTemplate "bootstrap")
|
||||
case cannotRun webapp of
|
||||
Nothing -> do
|
||||
navbar <- map navdetails <$> selectNavBar
|
||||
pageinfo <- widgetToPageContent $ do
|
||||
addStylesheet $ StaticR css_bootstrap_css
|
||||
addStylesheet $ StaticR css_bootstrap_responsive_css
|
||||
addScript $ StaticR jquery_full_js
|
||||
addScript $ StaticR js_bootstrap_dropdown_js
|
||||
addScript $ StaticR js_bootstrap_modal_js
|
||||
addScript $ StaticR js_bootstrap_collapse_js
|
||||
$(widgetFile "page")
|
||||
giveUrlRenderer $(Hamlet.hamletFile $ hamletTemplate "bootstrap")
|
||||
Just msg -> error msg
|
||||
where
|
||||
navdetails i = (navBarName i, navBarRoute i, Just i == navbaritem)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue