!7 concept MemberCompany { S productName; S description; S funding; S raised; int payZonesSubscribed; S ends; } cm Pays5 > GazelleExamples { void init { super.init(); botName = heading = adminName = "PAYS5"; templateID = #1030430; cssID = "396"; set enableVars; set enableAvatars; set showTalkToBotLink; set enableRadioButtons; set quickRadioButtons; set newDialogAfterWindowClosed; set showJoiningConversation; timeZone = nyTimeZone_string(); unset phoneNumberSpecialInputField; } L crudClasses(Req req) { ret listPlus(super.crudClasses(req), MemberCompany); } Set hiddenCrudClasses() { ret litset(); } L botCmdClasses() { ret dynNewBot2_botCmdClasses(); } S authFormHeading() { ret h3("pays5.com"); } void makeFramer(Req req) { super.makeFramer(req); req.framer.renderTitle = () -> h1(ahref(baseLink + "/", "Pays5.com") + " " + htmlEncode2(req.framer.title)); } S calcVar(Conversation conv, S var) { if (eqic(var, "hasUserName")) ret str(nempty(calcVar(conv, "userName"))); ret super.calcVar(conv, var); } S cssURL() { ret "https://pays5.com/text/" + cssID; } O serveOtherPage(Req req) { if (eqOptSlash(req.uri, "/companies")) { req.markNoSpam(); S template = getText(eq(req.params.get("dev"), "1") ? 2961 : 2559); SmoothHTMLTemplater templater = new(template); templater.entriesByType.put("company", map(list(MemberCompany), x -> templater.mapToEntry(litcimap( "Wash pebbles" := x.productName, "spherical hydrogel sanitiser" := x.description, "$ 435,000" := x.funding, "% 1.245" := x.raised, "6,432" := x.payZonesSubscribed, "34 days" := x.ends )))); ret templater.render(); } ret super.serveOtherPage(req); } bool allowedTemplateID(S id) { ret sameSnippetID(id, #1030498); } } // end of module !include early #1029913 // gazelle.rocks