X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Rakka%2FWiki%2FInterpreter%2FBase.hs;h=ed81494e62e4c671e13d4f2ba682251752ce8904;hb=fcddebcc3cc02ae8d1904b9338334d538019e74a;hp=b17af3253c1b7031046210d5cd465a67b8467b4b;hpb=f7ff1639d50b827a8ce1e4dd3631ce300ecb3d19;p=Rakka.git diff --git a/Rakka/Wiki/Interpreter/Base.hs b/Rakka/Wiki/Interpreter/Base.hs index b17af32..ed81494 100644 --- a/Rakka/Wiki/Interpreter/Base.hs +++ b/Rakka/Wiki/Interpreter/Base.hs @@ -3,8 +3,6 @@ module Rakka.Wiki.Interpreter.Base ) where -import Control.Arrow -import Control.Arrow.ListArrow import Data.Map (Map) import qualified Data.Map as M import Data.Maybe @@ -12,8 +10,8 @@ import Rakka.Page import Rakka.SystemConfig import Rakka.Wiki import Rakka.Wiki.Interpreter -import Text.XML.HXT.Arrow.XmlArrow -import Text.XML.HXT.Arrow.XmlNodeSet +import Text.XML.HXT.Arrow +import Text.XML.HXT.XPath interpreters :: [Interpreter] @@ -26,6 +24,7 @@ interpreters = [ lineBreakInterp , editPageInterp , loginInterp , searchFieldInterp + , configurationInterp ] @@ -95,7 +94,7 @@ otherLangsInterp (langName, name) : mergeTables m xs mkLangList :: [(LanguageName, PageName)] -> BlockElement - mkLangList xs = List Bullet (map mkLangLink xs) + mkLangList = List Bullet . map mkLangLink mkLangLink :: (LanguageName, PageName) -> ListItem mkLangLink (langName, name) @@ -105,7 +104,7 @@ otherLangsInterp -- +-- class="newButton controls" /> newPageInterp :: Interpreter newPageInterp = InlineCommandInterpreter { @@ -116,7 +115,7 @@ newPageInterp attrs = [ ("type" , "button") , ("value" , label) , ("onclick", "Rakka.newPage()") - , ("class" , "newButton") + , ("class" , "newButton controls") ] in return (Input attrs) @@ -126,7 +125,7 @@ newPageInterp -- +-- class="editButton controls" /> editPageInterp :: Interpreter editPageInterp = InlineCommandInterpreter { @@ -138,7 +137,7 @@ editPageInterp attrs = [ ("type" , "button") , ("value" , label) , ("onclick", "Rakka.editPage(\"" ++ name ++ "\")") - , ("class" , "editButton") + , ("class" , "editButton controls") ] in return (Input attrs) @@ -147,7 +146,7 @@ editPageInterp -- +-- class="loginButton controls" /> loginInterp :: Interpreter loginInterp = InlineCommandInterpreter { @@ -156,7 +155,7 @@ loginInterp = \ _ _ -> let attrs = [ ("type" , "button") , ("value", "Login") - , ("class", "loginButton") + , ("class", "loginButton controls") ] in return (Input attrs) @@ -176,4 +175,21 @@ searchFieldInterp ] in return (Input attrs) - } \ No newline at end of file + } + +-- +configurationInterp :: Interpreter +configurationInterp + = InlineCommandInterpreter { + iciName = "configuration" + , iciInterpret + = \ _ _ -> + let attrs = [ ("type" , "button") + , ("value", "Configuration") + , ("class", "configButton controls") + ] + in + return (Input attrs) + }