X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Rakka%2FWiki%2FInterpreter%2FBase.hs;h=1af5c77e9844f7e5497b8c4ba364f3ac8440d101;hb=88747f2;hp=2363b9b5da362bdee29c2433f8ff9b3b21a9361e;hpb=0b97160b4d55eca16f3c56b47a908997fc458284;p=Rakka.git diff --git a/Rakka/Wiki/Interpreter/Base.hs b/Rakka/Wiki/Interpreter/Base.hs index 2363b9b..1af5c77 100644 --- a/Rakka/Wiki/Interpreter/Base.hs +++ b/Rakka/Wiki/Interpreter/Base.hs @@ -10,7 +10,7 @@ import Rakka.Page import Rakka.SystemConfig import Rakka.Wiki import Rakka.Wiki.Interpreter -import Text.XML.HXT.Arrow +import Text.XML.HXT.XPath interpreters :: [Interpreter] @@ -23,6 +23,7 @@ interpreters = [ lineBreakInterp , editPageInterp , loginInterp , searchFieldInterp + , configurationInterp ] @@ -92,7 +93,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) @@ -102,7 +103,7 @@ otherLangsInterp -- +-- class="newButton controls" /> newPageInterp :: Interpreter newPageInterp = InlineCommandInterpreter { @@ -113,7 +114,7 @@ newPageInterp attrs = [ ("type" , "button") , ("value" , label) , ("onclick", "Rakka.newPage()") - , ("class" , "newButton") + , ("class" , "newButton controls") ] in return (Input attrs) @@ -123,7 +124,7 @@ newPageInterp -- +-- class="editButton controls" /> editPageInterp :: Interpreter editPageInterp = InlineCommandInterpreter { @@ -135,7 +136,7 @@ editPageInterp attrs = [ ("type" , "button") , ("value" , label) , ("onclick", "Rakka.editPage(\"" ++ name ++ "\")") - , ("class" , "editButton") + , ("class" , "editButton controls") ] in return (Input attrs) @@ -144,7 +145,7 @@ editPageInterp -- +-- class="loginButton controls" /> loginInterp :: Interpreter loginInterp = InlineCommandInterpreter { @@ -153,7 +154,7 @@ loginInterp = \ _ _ -> let attrs = [ ("type" , "button") , ("value", "Login") - , ("class", "loginButton") + , ("class", "loginButton controls") ] in return (Input attrs) @@ -174,3 +175,20 @@ searchFieldInterp in return (Input attrs) } + +-- +configurationInterp :: Interpreter +configurationInterp + = InlineCommandInterpreter { + iciName = "configuration" + , iciInterpret + = \ _ _ -> + let attrs = [ ("type" , "button") + , ("value", "Configuration") + , ("class", "configButton controls") + ] + in + return (Input attrs) + }