[more of same thomashartman1@gmail.com**20080926122250] hunk ./src/AppStateSetBased.hs 131 - \learning stuff and releasing some open source software I've been wanting to do. \n\ - \The last project I did was some work for the ripplepay project." + \learning stuff and releasing some open source software I've been wanting to do, \ + \including this tutorial." hunk ./src/Controller.hs 87 - tmplattrs = maybe (def ++ [("registerAsConsultant","register as HAppS consultant")]) + tmplattrs = maybe (def ++ [("registerAsConsultant","list yourself as a HAppS consultant")]) hunk ./src/ControllerGetActions.hs 52 - tmplattrs = maybe (def++[("postJob","post HAppS job")]) (\_ -> def) (mbUser rglobs) + tmplattrs = maybe (def++[("postJob","post a HAppS job")]) (\_ -> def) (mbUser rglobs) hunk ./src/ControllerGetActions.hs 90 - (Just u) -> return . toResponse . HtmlString . paintUserProfile rglobs $ u + (Just u) -> do let pr = paintUserProfile rglobs u + return . tutlayoutU rglobs [("profile",pr)] $ "viewconsultantprofile" hunk ./src/ControllerGetActions.hs 94 -paintUserProfile :: RenderGlobals -> User -> String -paintUserProfile rglobs ((User n _ mbCp js)) = - let showblurb = maybe "" - ( paintblurb . blurb ) - mbCp - showbillingrate = maybe "" billing_rate mbCp - jobsPosted = paintJobsTable n rglobs $ js - in tutlayout rglobs [("username",n) - , ("blurb",showblurb) - , ("jobsPosted",jobsPosted) - , ("billingRate",showbillingrate)] "viewconsultantprofile" + hunk ./src/ControllerGetActions.hs 113 - currPr = paintUserProfile rglobs currU hunk ./src/ControllerGetActions.hs 115 - (const "") mbProfile + (const $ "Current Profile: (To remove your consultant profile, and prevent your user \ + \from showing up in searches for \ + \HAppS consultants, make all form fields blank.)" ++ paintUserProfile rglobs currU) + mbProfile hunk ./src/ControllerGetActions.hs 129 -paintJobsTable postedBy rglobs jobsData = paintTable (templates rglobs) - (Just ["     ","project","budget"]) - jobCells - Nothing - where jobCells = map ( \((Job j budget blurb)) -> - -- first cell is empty string for spacking - [ "",simpleLink (templates rglobs) ("/tutorial/viewjob?user="++postedBy++"&job=" ++ j,j) - , budget - ] ) jobsData + hunk ./src/View.hs 13 +import SerializeableUsers hunk ./src/View.hs 138 +paintUserProfile :: RenderGlobals -> User -> String +paintUserProfile rglobs (User n _ mbCp js) = + let showblurb = maybe "" + ( paintblurb . blurb ) + mbCp + showbillingrate = maybe "" billing_rate mbCp + jobsPosted = paintJobsTable n rglobs $ js + in renderTemplateGroup (templates rglobs) [("username",n) + , ("blurb",showblurb) + , ("jobsPosted",jobsPosted) + , ("billingRate",showbillingrate)] "viewconsultantprofileInclude" + +paintJobsTable :: String -> RenderGlobals -> [Job] -> String +paintJobsTable postedBy rglobs jobsData = paintTable (templates rglobs) + (Just ["     ","project","budget"]) + jobCells + Nothing + where jobCells = map ( \((Job j budget blurb)) -> + -- first cell is empty string for spacking + [ "",simpleLink (templates rglobs) ("/tutorial/viewjob?user="++postedBy++"&job=" ++ j,j) + , budget + ] ) jobsData hunk ./templates/editconsultantprofile.st 3 -
$ showInConsultantSearchInfo $ - - 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." hunk ./templates/editconsultantprofile.st 11 - - + $! + !$ hunk ./templates/editconsultantprofile.st 18 - - - -
- - +
$ showInConsultantSearchInfo $
hunk ./templates/viewconsultantprofile.st 1 -About Me: $ blurb $
-Billing Rate: $ billingRate $
-$! -