]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki/Interpreter/Base.hs
Fixing build breakage...
[Rakka.git] / Rakka / Wiki / Interpreter / Base.hs
index 2363b9b5da362bdee29c2433f8ff9b3b21a9361e..1af5c77e9844f7e5497b8c4ba364f3ac8440d101 100644 (file)
@@ -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
 -- <input type="button"
 --        value="Create new page"
 --        onclick="Rakka.newPage()"
---        class="newButton" />
+--        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
 -- <input type="button"
 --        value="Edit"
 --        onclick="Rakka.editPage(\"Foo\")"
---        class="editButton" />
+--        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
 
 -- <input type="button"
 --        value="Login"
---        class="loginButton" />
+--        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)
       }
+
+-- <input type="button"
+--        value="Configuration"
+--        class="configButton controls" />
+configurationInterp :: Interpreter
+configurationInterp 
+    = InlineCommandInterpreter {
+        iciName = "configuration"
+      , iciInterpret
+          = \ _ _ ->
+            let attrs = [ ("type" , "button")
+                        , ("value", "Configuration")
+                        , ("class", "configButton controls")
+                        ]
+            in
+              return (Input attrs)
+      }