diff --git a/hledger-web/Application.hs b/hledger-web/Application.hs index a39ea9bf2..592eac9ab 100644 --- a/hledger-web/Application.hs +++ b/hledger-web/Application.hs @@ -14,10 +14,13 @@ import Network.HTTP.Conduit (newManager, def) -- Import all relevant handler modules here. -- Don't forget to add new modules to your cabal file! --- import Handler.Home -import Handler.Handlers +import Handler.RootR +import Handler.JournalR +import Handler.JournalEditR +import Handler.JournalEntriesR +import Handler.RegisterR -import Hledger.Web.Options +import Hledger.Web.Options (defwebopts) -- This line actually creates our YesodDispatch instance. It is the second half -- of the call to mkYesodData which occurs in Foundation.hs. Please see the diff --git a/hledger-web/Handler/Common.hs b/hledger-web/Handler/Common.hs new file mode 100644 index 000000000..c611bd015 --- /dev/null +++ b/hledger-web/Handler/Common.hs @@ -0,0 +1,256 @@ +-- | Common page components. + +module Handler.Common where + +import Import + +import Data.List (sort, nub) +import System.FilePath (takeFileName) + +import Handler.Utils +import Hledger.Data +import Hledger.Query +import Hledger.Reports +import Hledger.Cli.Options +import Hledger.Web.Options + + +-- | Global toolbar/heading area. +topbar :: ViewData -> HtmlUrl AppRoute +topbar VD{..} = [hamlet| +