equal
deleted
inserted
replaced
30 need_navigation = False |
30 need_navigation = False |
31 |
31 |
32 def call(self, title=None): |
32 def call(self, title=None): |
33 """Dumps a timetable from a resultset composed of a note (anything |
33 """Dumps a timetable from a resultset composed of a note (anything |
34 with start/stop) and a user (anything)""" |
34 with start/stop) and a user (anything)""" |
35 self.req.add_css('cubicweb.timetable.css') |
35 self._cw.add_css('cubicweb.timetable.css') |
36 dates = {} |
36 dates = {} |
37 users = [] |
37 users = [] |
38 users_max = {} |
38 users_max = {} |
39 |
39 |
40 # XXX: try refactoring with calendar.py:OneMonthCal |
40 # XXX: try refactoring with calendar.py:OneMonthCal |
41 for row in xrange(self.rset.rowcount): |
41 for row in xrange(self.cw_rset.rowcount): |
42 task = self.rset.get_entity(row, 0) |
42 task = self.cw_rset.get_entity(row, 0) |
43 if len(self.rset[row])>1: |
43 if len(self.cw_rset[row])>1: |
44 user = self.rset.get_entity(row, 1) |
44 user = self.cw_rset.get_entity(row, 1) |
45 else: |
45 else: |
46 user = u"*" |
46 user = u"*" |
47 the_dates = [] |
47 the_dates = [] |
48 if task.start and task.stop: |
48 if task.start and task.stop: |
49 if task.start.toordinal() == task.stop.toordinal(): |
49 if task.start.toordinal() == task.stop.toordinal(): |