[nicer login thomashartman1@gmail.com**20080908170434] hunk ./src/Controller.hs 58 -tutlayoutWeb rq attrs tmpl = ioMsgToWeb $ tutlayoutReq rq attrs tmpl - hunk ./src/Controller.hs 77 - then startsess user rq - else errW "login" rq "login error: invalid username or password" + then do startsess user rq + else ioMsgToWeb $ tutlayoutReq rq [("errormsg","login error: invalid username or password")] "home" hunk ./src/Controller.hs 81 + + + +startsess :: String -> Request -> WebT IO Response hunk ./src/Controller.hs 88 - redirectHome rq - -redirectHome rq = seeOther "/" =<< tutlayoutWeb rq [] "home" - + redirectHome rq hunk ./src/Controller.hs 100 + + hunk ./src/Controller.hs 111 - -- let auth = UserAuthInfo user pass1 - -- tutlayoutWeb rq [("newuser",user)] "newuser" hunk ./src/Controller.hs 115 +redirectHome rq = ioMsgToWeb ( tutlayoutReq rq [] "home" ) >>= seeOther "/" + + +errW tmpl rq msg = ioMsgToWeb $ tutlayoutReq rq [("errormsg", msg)] tmpl hunk ./src/Controller.hs 121 -errW tmpl rq msg = tutlayoutWeb rq [("errormsg", msg)] tmpl hunk ./src/View.hs 18 - header <- getHeaderArea mbLoggedInAs kvMenustyleActivelink + header <- getHeaderArea mbLoggedInAs ( attrs ++ kvMenustyleActivelink ) -- ugly.. smelly hunk ./src/View.hs 28 +-- but then you need to start importing HAppS.* stuff again. what to do? hunk ./src/View.hs 31 - ( renderTemplateDir "templates" kvMenustyleActivelink "menuNotLoggedIn" ) + ( renderTemplateDir "templates" kvMenustyleActivelink "login" ) hunk ./templates/menuNotLoggedIn.st 1 - - - $! !$ -
$ login() $ $ register() $
+ rmfile ./templates/menuNotLoggedIn.st