web: call print command "journal", make it default; hide histogram command

This commit is contained in:
Simon Michael 2009-11-19 19:15:33 +00:00
parent 6d931ce54d
commit fc117d504c

View File

@ -128,13 +128,13 @@ server opts args l =
get "/balance" $ command [] showBalanceReport -- String -> ReaderT Env (StateT Response IO) () -> State Loli () get "/balance" $ command [] showBalanceReport -- String -> ReaderT Env (StateT Response IO) () -> State Loli ()
get "/register" $ command [] showRegisterReport get "/register" $ command [] showRegisterReport
get "/histogram" $ command [] showHistogram get "/histogram" $ command [] showHistogram
get "/ledger" $ ledgerpage [] l'' (showLedgerTransactions opts' args') get "/journal" $ ledgerpage [] l'' (showLedgerTransactions opts' args')
post "/ledger" $ handleAddform l'' post "/journal" $ handleAddform l''
get "/env" $ getenv >>= (text . show) get "/env" $ getenv >>= (text . show)
get "/params" $ getenv >>= (text . show . Hack.Contrib.Request.params) get "/params" $ getenv >>= (text . show . Hack.Contrib.Request.params)
get "/inputs" $ getenv >>= (text . show . Hack.Contrib.Request.inputs) get "/inputs" $ getenv >>= (text . show . Hack.Contrib.Request.inputs)
public (Just "Commands/Web") ["/static"] public (Just "Commands/Web") ["/static"]
get "/" $ redirect ("balance") Nothing get "/" $ redirect ("journal") Nothing
) env ) env
ledgerpage :: [String] -> Ledger -> (Ledger -> String) -> AppUnit ledgerpage :: [String] -> Ledger -> (Ledger -> String) -> AppUnit
@ -211,10 +211,9 @@ navlinks _ = do
let addparams=(++(printf "?a=%s&p=%s" (urlEncode a) (urlEncode p))) let addparams=(++(printf "?a=%s&p=%s" (urlEncode a) (urlEncode p)))
link s = <a href=(addparams s) class="navlink"><% s %></a> link s = <a href=(addparams s) class="navlink"><% s %></a>
<div id="navlinks"> <div id="navlinks">
<% link "ledger" %> | <% link "journal" %> |
<% link "balance" %> |
<% link "register" %> | <% link "register" %> |
<% link "histogram" %> <% link "balance" %>
</div> </div>
searchform :: Hack.Env -> HSP XML searchform :: Hack.Env -> HSP XML