web: hide run-time hamlet experiments for now
This commit is contained in:
parent
d00ae908de
commit
4a7ad12271
@ -1,7 +1,7 @@
|
||||
%script!type=text/javascript
|
||||
$$(document).ready(function() {
|
||||
/* dhtmlxcombo setup */
|
||||
window.dhx_globalImgPath="../static/images/";
|
||||
window.dhx_globalImgPath="../static/";
|
||||
var desccombo = new dhtmlXCombo("description");
|
||||
var acct1combo = new dhtmlXCombo("account1");
|
||||
var acct2combo = new dhtmlXCombo("account2");
|
||||
@ -43,3 +43,5 @@
|
||||
%td!colspan=4
|
||||
%input!type=hidden!name=action!value=add
|
||||
%input!type=submit!name=submit!value="add transaction"
|
||||
$if manyfiles
|
||||
\ to: ^journalselect.files^
|
||||
@ -10,7 +10,7 @@ module Hledger.Web.App
|
||||
)
|
||||
where
|
||||
import Control.Applicative ((<$>), (<*>))
|
||||
import Control.Failure
|
||||
-- import Control.Failure
|
||||
-- import qualified Data.ByteString.Lazy as L
|
||||
import Data.Either
|
||||
-- import System.Directory
|
||||
@ -24,8 +24,8 @@ import Yesod.Helpers.Static
|
||||
-- import Yesod.Helpers.Auth
|
||||
-- import Yesod.Mail
|
||||
-- import Yesod.WebRoutes
|
||||
import Text.Hamlet (defaultHamletSettings)
|
||||
import Text.Hamlet.RT
|
||||
-- import Text.Hamlet (defaultHamletSettings)
|
||||
-- import Text.Hamlet.RT
|
||||
|
||||
import Hledger.Cli.Add (appendToJournalFile)
|
||||
import Hledger.Cli.Balance
|
||||
@ -101,8 +101,8 @@ mkYesod "App" [$parseRoutes|
|
||||
/accounts AccountsOnlyR GET
|
||||
/journal JournalR GET POST
|
||||
/register RegisterR GET POST
|
||||
/addformrt AddformRTR GET
|
||||
|]
|
||||
-- /addformrt AddformRTR GET
|
||||
|
||||
type Handler = GHandler App App
|
||||
|
||||
@ -429,6 +429,8 @@ helplink :: String -> String -> Hamlet AppRoute
|
||||
helplink topic label = [$hamlet|%a!href=$u$!target=hledgerhelp $label$|]
|
||||
where u = manualurl ++ if null topic then "" else '#':topic
|
||||
|
||||
{-
|
||||
|
||||
-- | Render a runtime template with the provided runtime data as html.
|
||||
renderHamletFileRT :: FilePath -> HamletMap AppRoute -> Handler Html
|
||||
renderHamletFileRT hfile hmap = do
|
||||
@ -472,6 +474,8 @@ hdstringlist ss = HDList [ [([], hdstring s)] | s <- ss ]
|
||||
-- hamletToHamletRT :: Failure HamletException m => Hamlet AppRoute -> m HamletRT
|
||||
-- hamletToHamletRT h = stringToHamletRT $ show $ unsafeByteString $ renderHamlet show h
|
||||
|
||||
-}
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- handlers/views
|
||||
----------------------------------------------------------------------
|
||||
@ -1029,7 +1033,7 @@ mixedAmountAsHtml b = preEscapedString $ addclass $ intercalate "<br>" $ lines $
|
||||
-- hamletToRepHtml $ pageLayout td $ editform td s
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
{-
|
||||
-- | An add form with template files reloaded at runtime.
|
||||
getAddformRTR :: Handler RepHtml
|
||||
getAddformRTR = do
|
||||
@ -1076,6 +1080,8 @@ getAddformRTR = do
|
||||
,(["deschelp"], hdstring "eg: supermarket (optional)")
|
||||
,(["postingfields1"], HDHtml pfields1)
|
||||
,(["postingfields2"], HDHtml pfields2)
|
||||
,(["manyfiles"], HDBool $ (length $ files $ j) > 1)
|
||||
-- ,(["files"], ... $ files $ j)
|
||||
] :: HamletMap AppRoute)
|
||||
hamletToRepHtml $ pageLayout td $ htmlAsHamlet addform
|
||||
|
||||
-}
|
||||
Loading…
Reference in New Issue
Block a user