web/views/timetable.py
changeset 3451 6b46d73823f5
parent 3377 dd9d292b6a6d
child 3460 e4843535db25
equal deleted inserted replaced
3448:495862266785 3451:6b46d73823f5
    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():