Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
 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)
Exemplo n.º 7
0
 def render(self, request, block, content):
     return box(hd=block.title, bd=content).addClass(self.name)
Exemplo n.º 8
0
 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)