summaryrefslogtreecommitdiff
path: root/Assistant/WebApp
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/WebApp')
-rw-r--r--Assistant/WebApp/Configurators.hs7
-rw-r--r--Assistant/WebApp/DashBoard.hs13
-rw-r--r--Assistant/WebApp/Documentation.hs22
-rw-r--r--Assistant/WebApp/routes1
4 files changed, 32 insertions, 11 deletions
diff --git a/Assistant/WebApp/Configurators.hs b/Assistant/WebApp/Configurators.hs
index e3f0275d9..47a9b687e 100644
--- a/Assistant/WebApp/Configurators.hs
+++ b/Assistant/WebApp/Configurators.hs
@@ -44,13 +44,12 @@ introDisplay ident = do
counter = map show ([1..] :: [Int])
getConfigR :: Handler RepHtml
-getConfigR = defaultLayout $ do
+getConfigR = bootstrap (Just Config) $ do
sideBarDisplay
setTitle "Configuration"
- [whamlet|<a href="@{HomeR}">main|]
+ $(widgetFile "configurators/main")
getAddRepositoryR :: Handler RepHtml
-getAddRepositoryR = defaultLayout $ do
+getAddRepositoryR = bootstrap (Just Config) $ do
sideBarDisplay
setTitle "Add repository"
- [whamlet|<a href="@{HomeR}">main|]
diff --git a/Assistant/WebApp/DashBoard.hs b/Assistant/WebApp/DashBoard.hs
index 2961dabd3..f80fb8787 100644
--- a/Assistant/WebApp/DashBoard.hs
+++ b/Assistant/WebApp/DashBoard.hs
@@ -72,18 +72,17 @@ dashboard warnNoScript = do
$(widgetFile "dashboard/main")
getHomeR :: Handler RepHtml
-getHomeR = defaultLayout $ dashboard True
+getHomeR = bootstrap (Just DashBoard) $ dashboard True
+
+{- Same as HomeR, except no autorefresh at all (and no noscript warning). -}
+getNoScriptR :: Handler RepHtml
+getNoScriptR = bootstrap (Just DashBoard) $ dashboard False
{- Same as HomeR, except with autorefreshing via meta refresh. -}
getNoScriptAutoR :: Handler RepHtml
-getNoScriptAutoR = defaultLayout $ do
+getNoScriptAutoR = bootstrap (Just DashBoard) $ do
let ident = NoScriptR
let delayseconds = 3 :: Int
let this = NoScriptAutoR
toWidgetHead $(hamletFile $ hamletTemplate "dashboard/metarefresh")
dashboard False
-
-{- Same as HomeR, except no autorefresh at all (and no noscript warning). -}
-getNoScriptR :: Handler RepHtml
-getNoScriptR = defaultLayout $
- dashboard False
diff --git a/Assistant/WebApp/Documentation.hs b/Assistant/WebApp/Documentation.hs
new file mode 100644
index 000000000..b0a9e4d98
--- /dev/null
+++ b/Assistant/WebApp/Documentation.hs
@@ -0,0 +1,22 @@
+{- git-annex assistant webapp documentation
+ -
+ - Copyright 2012 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses, TemplateHaskell, OverloadedStrings, RankNTypes #-}
+
+module Assistant.WebApp.Documentation where
+
+import Assistant.WebApp
+import Assistant.WebApp.SideBar
+import Utility.Yesod
+
+import Yesod
+
+getAboutR :: Handler RepHtml
+getAboutR = bootstrap (Just About) $ do
+ sideBarDisplay
+ setTitle "About git-annex"
+ $(widgetFile "documentation/about")
diff --git a/Assistant/WebApp/routes b/Assistant/WebApp/routes
index 75f1ad7c7..5a1550b24 100644
--- a/Assistant/WebApp/routes
+++ b/Assistant/WebApp/routes
@@ -3,6 +3,7 @@
/noscriptauto NoScriptAutoR GET
/config ConfigR GET
/addrepository AddRepositoryR GET
+/about AboutR GET
/transfers/#NotificationId TransfersR GET
/sidebar/#NotificationId SideBarR GET