web/views/baseviews.py
branchtls-sprint
changeset 1712 32ab85031814
parent 1680 39860636e184
child 1760 6b97d286eb5a
--- a/web/views/baseviews.py	Thu May 07 02:47:06 2009 -0700
+++ b/web/views/baseviews.py	Thu May 07 12:46:35 2009 +0200
@@ -68,6 +68,7 @@
     def cell_call(self, row, col, props=None, displaytime=False, format='text/html'):
         etype = self.rset.description[row][col]
         value = self.rset.rows[row][col]
+       
         if etype == 'String':
             entity, rtype = self.rset.related_entity(row, col)
             if entity is not None:
@@ -89,10 +90,10 @@
                 self.w(self.req.__('%%d%sweeks' % space) % (value.days // 7))
             elif value.days > 2:
                 self.w(self.req.__('%%d%sdays' % space) % int(value.days))
-            elif value.hours > 2:
-                self.w(self.req.__('%%d%shours' % space) % int(value.hours))
-            elif value.minutes >= 2:
-                self.w(self.req.__('%%d%sminutes' % space) % int(value.minutes))
+            elif value.seconds > 3600:
+                self.w(self.req.__('%%d%shours' % space) % int(value.seconds // 3600))
+            elif value.seconds >= 120:
+                self.w(self.req.__('%%d%sminutes' % space) % int(value.seconds // 60))
             else:
                 self.w(self.req.__('%%d%sseconds' % space) % int(value.seconds))
             return