reorg templates

This commit is contained in:
Joey Hess 2012-07-31 01:24:49 -04:00
parent 58dfa3fa5b
commit 5fed026bcd
11 changed files with 8 additions and 8 deletions

View file

@ -38,7 +38,7 @@ introDisplay ident = do
let notenough = n < 2 let notenough = n < 2
let barelyenough = n == 2 let barelyenough = n == 2
let morethanenough = n > 2 let morethanenough = n > 2
$(widgetFile "intro") $(widgetFile "configurators/intro")
lift $ modifyWebAppState $ \s -> s { showIntro = False } lift $ modifyWebAppState $ \s -> s { showIntro = False }
where where
counter = map show ([1..] :: [Int]) counter = map show ([1..] :: [Int])

View file

@ -45,9 +45,9 @@ transfersDisplay warnNoScript = do
if null transfers if null transfers
then ifM (lift $ showIntro <$> getWebAppState) then ifM (lift $ showIntro <$> getWebAppState)
( introDisplay ident ( introDisplay ident
, $(widgetFile "transfers") , $(widgetFile "dashboard/transfers")
) )
else $(widgetFile "transfers") else $(widgetFile "dashboard/transfers")
{- Called by client to get a display of currently in process transfers. {- Called by client to get a display of currently in process transfers.
- -
@ -69,7 +69,7 @@ dashboard :: Bool -> Widget
dashboard warnNoScript = do dashboard warnNoScript = do
sideBarDisplay sideBarDisplay
let content = transfersDisplay warnNoScript let content = transfersDisplay warnNoScript
$(widgetFile "dashboard") $(widgetFile "dashboard/main")
getHomeR :: Handler RepHtml getHomeR :: Handler RepHtml
getHomeR = defaultLayout $ dashboard True getHomeR = defaultLayout $ dashboard True
@ -80,7 +80,7 @@ getNoScriptAutoR = defaultLayout $ do
let ident = NoScriptR let ident = NoScriptR
let delayseconds = 3 :: Int let delayseconds = 3 :: Int
let this = NoScriptAutoR let this = NoScriptAutoR
toWidgetHead $(hamletFile $ hamletTemplate "metarefresh") toWidgetHead $(hamletFile $ hamletTemplate "dashboard/metarefresh")
dashboard False dashboard False
{- Same as HomeR, except no autorefresh at all (and no noscript warning). -} {- Same as HomeR, except no autorefresh at all (and no noscript warning). -}

View file

@ -34,7 +34,7 @@ autoUpdate ident geturl ms_delay ms_startdelay = do
let delay = show ms_delay let delay = show ms_delay
let startdelay = show ms_startdelay let startdelay = show ms_startdelay
addScript $ StaticR longpolling_js addScript $ StaticR longpolling_js
$(widgetFile "longpolling") $(widgetFile "notifications/longpolling")
{- Notifier urls are requested by the javascript, to avoid allocation {- Notifier urls are requested by the javascript, to avoid allocation
- of NotificationIds when noscript pages are loaded. This constructs a - of NotificationIds when noscript pages are loaded. This constructs a

View file

@ -34,7 +34,7 @@ sideBarDisplay = do
mapM_ renderalert $ mapM_ renderalert $
take displayAlerts $ reverse $ sortAlertPairs alertpairs take displayAlerts $ reverse $ sortAlertPairs alertpairs
let ident = "sidebar" let ident = "sidebar"
$(widgetFile "sidebar") $(widgetFile "sidebar/main")
autoUpdate ident NotifierSideBarR (10 :: Int) (10 :: Int) autoUpdate ident NotifierSideBarR (10 :: Int) (10 :: Int)
where where
bootstrapclass Activity = "alert-info" bootstrapclass Activity = "alert-info"
@ -60,7 +60,7 @@ sideBarDisplay = do
addalert i closable block divclass heading widget = do addalert i closable block divclass heading widget = do
let alertid = show i let alertid = show i
let closealert = CloseAlert i let closealert = CloseAlert i
$(widgetFile "alert") $(widgetFile "sidebar/alert")
{- Called by client to get a sidebar display. {- Called by client to get a sidebar display.
- -