def render(self, request, block, content): return box(hd=self.title(block), bd=content, ft=self.footer(request,block,content), id=self.id(block), edit_menu=self.edit_menu(request, block), collapsable=self.collapsable, collapsed=self.collapsed, detachable=self.detachable)
def testBoxMenu(self): box = html.box(hd='This is a box', bd='bla bla ...', collapsable=True) self.assertEqual(len(box.children), 2) self.assertTrue('hd' in box.children) self.assertTrue('bd' in box.children)
def testBox(self): box = html.box(hd='This is a box', bd='bla bla ...') self.assertEqual(len(box.children), 2) text = box.render() box = html.box(hd='This is a box', bd='bla bla ...', ft='...') self.assertEqual(len(box.children), 3)
def render(self, request, block=None, **kwargs): text = super(PageChangeView, self).render(request, block=True) links = page_links(request) return box(hd='Editing page {0}'.format(request.instance), bd=text, collapsed=True, edit_menu=links)\ .addClass(classes.edit)
def render(self, request, block, content): return box(hd=block.title, bd=content).addClass(self.name)
def render(self, request, block=None, **kwargs): text = super(PageChangeView,self).render(request, block=True) links = page_links(request) return box(hd='Editing page {0}'.format(request.instance), bd=text, collapsed=True, edit_menu=links)\ .addClass(classes.edit)