[iprevnext] implements cell_call to remove warning when displayed in the main content zone
--- a/web/views/navigation.py Tue Jul 13 08:11:03 2010 +0200
+++ b/web/views/navigation.py Tue Jul 13 15:45:02 2010 +0200
@@ -207,12 +207,15 @@
# itself
title = _('contentnavigation_prevnext')
help = _('contentnavigation_prevnext_description')
- __select__ = (EntityVComponent.__select__
- & adaptable('IPrevNext'))
+ __select__ = EntityVComponent.__select__ & adaptable('IPrevNext')
context = 'navbottom'
order = 10
+
def call(self, view=None):
- entity = self.cw_rset.get_entity(0, 0)
+ self.cell_call(0, 0, view=view)
+
+ def cell_call(self, row, col, view=None):
+ entity = self.cw_rset.get_entity(row, col)
adapter = entity.cw_adapt_to('IPrevNext')
previous = adapter.previous_entity()
next = adapter.next_entity()