ui tweaks
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 12 Oct 2010 18:47:24 +0200
changeset 250 31e5ad569b1b
parent 249 1d6c4ef2e58f
child 251 d3efe2c76fc2
ui tweaks
views/boxes.py
--- a/views/boxes.py	Tue Oct 12 18:30:49 2010 +0200
+++ b/views/boxes.py	Tue Oct 12 18:47:24 2010 +0200
@@ -23,10 +23,11 @@
                   & has_related_entities('entry_of', 'object'))
     title = _('blog.archives_by_date')
     order = 35
+    context = 'left'
 
     def render_body(self, w):
         rset = self.entity.related('entry_of', 'object')
-        self._cw.view('cw.archive.by_date', rset, maxentries=12,
+        self._cw.view('cw.archive.by_date', rset, maxentries=6,
                       basepath=self.entity.rest_path() + '/blogentries',
                       w=w)
 
@@ -38,10 +39,11 @@
                   & has_related_entities('entry_of', 'object'))
     title = _('blog.archives_by_author')
     order = 36
+    context = 'left'
 
     def render_body(self, w):
         rset = self.entity.related('entry_of', 'object')
-        self._cw.view('cw.archive.by_author', rset, maxentries=12,
+        self._cw.view('cw.archive.by_author', rset,
                       basepath=self.entity.rest_path() + '/blogentries',
                       w=w)
 
@@ -54,6 +56,7 @@
     title = _('blog.latest_blogs')
     order = 34
     display_see_more_link = True
+    contextual = False
 
     def latest_blogs_rset(self):
         return self._cw.execute(
@@ -92,6 +95,7 @@
     __select__ = (component.CtxComponent.__select__
                   & one_line_rset() & is_instance('Blog'))
     display_see_more_link = False
+    contextual = True
 
     def latest_blogs_rset(self):
         blog = self.cw_rset.get_entity(self.cw_row or 0, self.cw_col or 0)