sclass HMultiCRUD extends HAbstractRenderable { Concepts cc = db_mainConcepts(); L> classes; bool mutationRights; S mainTitle = "CRUD"; *(S *baseLink, Class... classes) { this(classes); } *(Class... classes) { this.classes = asList(classes); } S renderNavi() { ret p(joinWithVBar(map(classes, c -> ahref(baseLinkPlus(shortName(c)), shortName(c))))); } O renderPage(S uri, SS params) { LS parts = tok_splitAtSlash_nempties(uri); S html = renderNavi(); Var title = new(mainTitle); if (nempty(parts)) { HCRUD crud = makeCRUD(first(parts)); if (crud != null) { crud.mutationRights = mutationRights; crud.baseLink = baseLinkPlus(first(parts)); crud.makeFrame = (title2, contents) -> { title.set(title! + " | " + title2); ret h3(title2) + contents; }; html += crud.renderPage(params); } } //ret "parts: " + sfu(parts); ret frame(title, html); } selfType mutationRights(bool mutationRights) { this.mutationRights = mutationRights; this; } // override me HCRUD makeCRUD(S className) { null; } }