Skip to content

Commit

Permalink
Added fields to PageLayout.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Jul 11, 2009
1 parent 7b4eeb3 commit affd00e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Network/Gitit/Layout.hs
Expand Up @@ -38,7 +38,11 @@ import Data.Maybe (isNothing, isJust, fromJust)

defaultPageLayout :: PageLayout
defaultPageLayout = PageLayout
{ pgTitle = ""
{ pgPageName = ""
, pgRevision = Nothing
, pgPrintable = False
, pgMessages = []
, pgTitle = ""
, pgScripts = []
, pgShowPageTools = True
, pgShowSiteNav = True
Expand All @@ -50,6 +54,10 @@ defaultPageLayout = PageLayout
-- | Returns formatted page
formattedPage :: PageLayout -> String -> Params -> Html -> GititServerPart Response
formattedPage layout page params htmlContents = do

-- NOTE: the following are used from params: pRevision, pPrintable, pMessages
-- make these part of PageLayout? and why not page too?

let rev = pRevision params
user <- getLoggedInUser
base' <- getWikiBase
Expand Down
6 changes: 5 additions & 1 deletion Network/Gitit/Types.hs
Expand Up @@ -168,7 +168,11 @@ instance HasContext PluginM where

-- | Abstract representation of page layout (tabs, scripts, etc.)
data PageLayout = PageLayout
{ pgTitle :: String
{ pgPageName :: String
, pgRevision :: Maybe String
, pgPrintable :: Bool
, pgMessages :: [String]
, pgTitle :: String
, pgScripts :: [String]
, pgShowPageTools :: Bool
, pgShowSiteNav :: Bool
Expand Down

0 comments on commit affd00e

Please sign in to comment.