webyesod: small cleanups
This commit is contained in:
parent
460cf2c774
commit
18bf123eae
@ -44,7 +44,11 @@ web opts args j = do
|
|||||||
server url port opts args j
|
server url port opts args j
|
||||||
|
|
||||||
browser :: String -> IO ()
|
browser :: String -> IO ()
|
||||||
browser url = putStrLn "starting web browser" >> threadDelay browserstartdelay >> openBrowserOn url >> return ()
|
browser url = do
|
||||||
|
putStrLn "starting web browser"
|
||||||
|
threadDelay browserstartdelay
|
||||||
|
openBrowserOn url
|
||||||
|
return ()
|
||||||
|
|
||||||
server :: String -> Int -> [Opt] -> [String] -> Journal -> IO ()
|
server :: String -> Int -> [Opt] -> [String] -> Journal -> IO ()
|
||||||
server url port opts args j = do
|
server url port opts args j = do
|
||||||
@ -57,7 +61,7 @@ server url port opts args j = do
|
|||||||
,appWebdir=fp
|
,appWebdir=fp
|
||||||
,appRoot=url
|
,appRoot=url
|
||||||
}
|
}
|
||||||
withStore "hledger" $ do -- IO ()
|
withStore "hledger" $ do
|
||||||
putValue "hledger" "journal" j
|
putValue "hledger" "journal" j
|
||||||
toWaiApp app >>= run port
|
toWaiApp app >>= run port
|
||||||
|
|
||||||
@ -174,10 +178,10 @@ navlinks a p = [$hamlet|
|
|||||||
searchform :: HledgerWebAppRoutes -> String -> String -> Hamlet HledgerWebAppRoutes
|
searchform :: HledgerWebAppRoutes -> String -> String -> Hamlet HledgerWebAppRoutes
|
||||||
searchform here a p = [$hamlet|
|
searchform here a p = [$hamlet|
|
||||||
%form#searchform
|
%form#searchform
|
||||||
search for: $
|
filter by: $
|
||||||
%input!name=a!size=20!value=$string.a$
|
%input!name=a!size=20!value=$string.a$
|
||||||
^ahelp^ $
|
^ahelp^ $
|
||||||
in reporting period: $
|
in period: $
|
||||||
%input!name=p!size=20!value=$string.p$
|
%input!name=p!size=20!value=$string.p$
|
||||||
^phelp^ $
|
^phelp^ $
|
||||||
%input!name=submit!type=submit!value=filter!style=display:none;
|
%input!name=submit!type=submit!value=filter!style=display:none;
|
||||||
@ -266,7 +270,7 @@ transactionfields n = [$hamlet|
|
|||||||
%input!size=15!name=$string.amtvar$!value=$string.amt$
|
%input!size=15!name=$string.amtvar$!value=$string.amt$
|
||||||
|]
|
|]
|
||||||
| otherwise = nulltemplate
|
| otherwise = nulltemplate
|
||||||
amthelp | n == 1 = "eg: 5, $9.01, €7" -- XXX , £75 <- misencoded
|
amthelp | n == 1 = "eg: 5, $6, €7.01"
|
||||||
| otherwise = ""
|
| otherwise = ""
|
||||||
acct = ""
|
acct = ""
|
||||||
amt = ""
|
amt = ""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user