]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki/Interpreter/Base.hs
Applied HLint
[Rakka.git] / Rakka / Wiki / Interpreter / Base.hs
index b17af3253c1b7031046210d5cd465a67b8467b4b..5daba841ae7021abeabcff9ade57fc75baa29737 100644 (file)
@@ -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,7 @@ 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
 
 
 interpreters :: [Interpreter]
@@ -26,6 +23,7 @@ interpreters = [ lineBreakInterp
                , editPageInterp
                , loginInterp
                , searchFieldInterp
+               , configurationInterp
                ]
 
 
@@ -95,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)
@@ -176,4 +174,21 @@ searchFieldInterp
                         ]
             in
               return (Input attrs)
-      }
\ No newline at end of file
+      }
+
+-- <input type="button"
+--        value="Configuration"
+--        class="configButton" />
+configurationInterp :: Interpreter
+configurationInterp 
+    = InlineCommandInterpreter {
+        iciName = "configuration"
+      , iciInterpret
+          = \ _ _ ->
+            let attrs = [ ("type" , "button")
+                        , ("value", "Configuration")
+                        , ("class", "configButton")
+                        ]
+            in
+              return (Input attrs)
+      }