- do BaseURI baseURI <- getSysConf (ctxSysConf ctx)
-
- let pageName = fromMaybe (ctxPageName ctx) (lookup "page" args)
- label = fromMaybe "Edit this page" (lookup "label" args)
- uri = uriToString id baseURI ""
- attrs = [ ("type" , "button")
- , ("value" , label)
- , ("onclick", "Rakka.editPage(\"" ++ uri ++ "\", \"" ++ pageName ++ "\")")
- , ("class" , "editButton")
- ]
-
- return (Input attrs)
+ 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")
+ ]
+ in
+ return (Input attrs)
+ }
+
+
+-- <input type="button"
+-- value="Login"
+-- class="loginButton" />
+loginInterp :: Interpreter
+loginInterp
+ = InlineCommandInterpreter {
+ iciName = "login"
+ , iciInterpret
+ = \ _ _ ->
+ let attrs = [ ("type" , "button")
+ , ("value", "Login")
+ , ("class", "loginButton")
+ ]
+ 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" />
+configurationInterp :: Interpreter
+configurationInterp
+ = InlineCommandInterpreter {
+ iciName = "configuration"
+ , iciInterpret
+ = \ _ _ ->
+ let attrs = [ ("type" , "button")
+ , ("value", "Configuration")
+ , ("class", "configButton")
+ ]
+ in
+ return (Input attrs)