[work on editConsultantProfile thomashartman1@gmail.com**20080926103231] hunk ./src/Controller.hs 66 + , dir "editconsultantprofile" [ methodSP GET . viewEditConsultantProfile $ rglobs ] hunk ./src/ControllerGetActions.hs 105 - + +viewEditConsultantProfile rglobs = + ServerPartT $ \rq -> do + mbCurrUser <- do let mbU = mbUser rglobs + maybe (return Nothing) + (\u -> query (GetUser u) ) + mbU + let + template = "editconsultantprofile" + errW msg = tutlayoutU rglobs [("errormsgProfile", msg)] template + lay u = let jobsPosted = jt (username u) rglobs . jobs $ u + + -- 2 maybes? this should be simpler. + showblurb = maybe "" + ( show . blurb ) + (consultantprofile u) + showbillingrate = maybe "" (show . billing_rate) (consultantprofile u) + + in tutlayoutU rglobs [("username",username u) + , ("blurb",showblurb) + , ("jobsPosted",jobsPosted) + , ("billingRate",showbillingrate)] template + + return $ maybe + ( errW $ "error: no user" ) + lay + mbCurrUser + + + + hunk ./templates/editconsultantprofile.st 4 + TK: The above message should show if there has been no info entered, otherwise the current profile + should display. + Then there should be a form with SUBMIT and PREVIEW and CANCEL EDITS buttons. + If there is info, could also say "To prevent your user from showing up in searches for HAppS consultants, + just make all the fields below blank." +
+ + + + + + + + + +
Blurb:
Billing Rate:
+ + +
+
+ + + hunk ./templates/editconsultantprofile.st 28 + +