+ iciName = "editPage"
+ , iciInterpret
+ = \ctx (InlineCommand _ args _) →
+ let name = fromMaybe (fromMaybe "" $ ctxPageName ctx) (lookup "page" args)
+ label = fromMaybe "Edit this page" (lookup "label" args)
+ attrs = [ ("type" , "button")
+ , ("value" , label)
+ , ("onclick", "Rakka.editPage(\"" ⊕ name ⊕ "\")")
+ , ("class" , "editButton controls")
+ ]
+ in
+ return (Input attrs)
+ }
+
+
+-- <input type="button"
+-- value="Login"
+-- class="loginButton controls" />
+loginInterp :: Interpreter
+loginInterp
+ = InlineCommandInterpreter {
+ iciName = "login"
+ , iciInterpret
+ = \ _ _ ->
+ let attrs = [ ("type" , "button")
+ , ("value", "Login")
+ , ("class", "loginButton controls")
+ ]
+ in
+ return (Input attrs)
+ }
+
+
+-- <input type="text"
+-- class="searchField" />
+searchFieldInterp :: Interpreter
+searchFieldInterp
+ = InlineCommandInterpreter {
+ iciName = "searchField"
+ , iciInterpret
+ = \ _ _ ->
+ let attrs = [ ("type" , "text")
+ , ("class", "searchField")
+ ]
+ in
+ return (Input attrs)
+ }
+
+-- <input type="button"
+-- value="Configuration"
+-- class="configButton controls" />
+configurationInterp ∷ Interpreter
+configurationInterp
+ = InlineCommandInterpreter {
+ iciName = "configuration"