web/views/timetable.py
changeset 3890 d7a270f50f54
parent 3460 e4843535db25
parent 3829 9674d62a54f9
child 3998 94cc7cad3d2d
--- a/web/views/timetable.py	Sun Nov 08 21:53:18 2009 +0100
+++ b/web/views/timetable.py	Fri Nov 20 19:35:54 2009 +0100
@@ -36,14 +36,13 @@
         dates = {}
         users = []
         users_max = {}
-
         # XXX: try refactoring with calendar.py:OneMonthCal
         for row in xrange(self.cw_rset.rowcount):
             task = self.cw_rset.get_entity(row, 0)
-            if len(self.cw_rset[row])>1:
+            if len(self.cw_rset[row]) > 1:
                 user = self.cw_rset.get_entity(row, 1)
             else:
-                user = u"*"
+                user = ALL_USERS
             the_dates = []
             if task.start and task.stop:
                 if task.start.toordinal() == task.stop.toordinal():
@@ -137,10 +136,10 @@
         columns = []
         for user, width in zip(users, widths):
             self.w(u'<th colspan="%s">' % max(MIN_COLS, width))
-            if user != u"*":
+            if user is ALL_USERS:
+                self.w('*')
+            else:
                 user.view('oneline', w=self.w)
-            else:
-                self.w(user)
             self.w(u'</th>')
         self.w(u'</tr>\n')
         return columns