[iprevnext] implements cell_call to remove warning when displayed in the main content zone
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 13 Jul 2010 15:45:02 +0200
changeset 5966 0677cfb28ad2
parent 5965 944a05aeb843
child 5967 8deedfeb7846
[iprevnext] implements cell_call to remove warning when displayed in the main content zone
web/views/navigation.py
--- 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()