web/views/calendar.py
branchstable
changeset 2996 866a2c135c33
parent 2312 af4d8f75c5db
child 3377 dd9d292b6a6d
child 4212 ab6573088b4a
equal deleted inserted replaced
2995:4ef565c1d183 2996:866a2c135c33
   291                                  __redirectrql=self.rset.printable_rql(),
   291                                  __redirectrql=self.rset.printable_rql(),
   292                                  __redirectparams=self.req.build_url_params(year=curdate.year, month=curmonth),
   292                                  __redirectparams=self.req.build_url_params(year=curdate.year, month=curmonth),
   293                                  __redirectvid=self.id
   293                                  __redirectvid=self.id
   294                                  )
   294                                  )
   295             self.w(u'<div class="cmd"><a href="%s">%s</a></div>' % (xml_escape(url), self.req._(u'add')))
   295             self.w(u'<div class="cmd"><a href="%s">%s</a></div>' % (xml_escape(url), self.req._(u'add')))
   296             self.w(u'&nbsp;')
   296             self.w(u'&#160;')
   297         self.w(u'</div>')
   297         self.w(u'</div>')
   298         self.w(u'<div class="cellContent">')
   298         self.w(u'<div class="cellContent">')
   299         for task_descr in rows:
   299         for task_descr in rows:
   300             if task_descr:
   300             if task_descr:
   301                 task = task_descr.task
   301                 task = task_descr.task
   310                 self.w(u'<div class="tooltip" ondblclick="stopPropagation(event); window.location.assign(\'%s\'); return false;">' % xml_escape(url))
   310                 self.w(u'<div class="tooltip" ondblclick="stopPropagation(event); window.location.assign(\'%s\'); return false;">' % xml_escape(url))
   311                 task.view('tooltip', w=self.w )
   311                 task.view('tooltip', w=self.w )
   312                 self.w(u'</div>')
   312                 self.w(u'</div>')
   313             else:
   313             else:
   314                 self.w(u'<div class="task">')
   314                 self.w(u'<div class="task">')
   315                 self.w(u"&nbsp;")
   315                 self.w(u"&#160;")
   316             self.w(u'</div>')
   316             self.w(u'</div>')
   317         self.w(u'</div>')
   317         self.w(u'</div>')
   318         self.w(u'</td>')
   318         self.w(u'</td>')
   319 
   319 
   320 
   320 
   441             self.w(u'</div>')
   441             self.w(u'</div>')
   442             self.w(u'</td>')
   442             self.w(u'</td>')
   443         self.w(u'</tr>')
   443         self.w(u'</tr>')
   444         self.w(u'</table></div>')
   444         self.w(u'</table></div>')
   445         self.w(u'<div id="coord"></div>')
   445         self.w(u'<div id="coord"></div>')
   446         self.w(u'<div id="debug">&nbsp;</div>')
   446         self.w(u'<div id="debug">&#160;</div>')
   447 
   447 
   448     def _build_calendar_cell(self, date, task_descrs):
   448     def _build_calendar_cell(self, date, task_descrs):
   449         inday_tasks = [t for t in task_descrs if t.is_one_day_task() and  t.in_working_hours()]
   449         inday_tasks = [t for t in task_descrs if t.is_one_day_task() and  t.in_working_hours()]
   450         wholeday_tasks = [t for t in task_descrs if not t.is_one_day_task()]
   450         wholeday_tasks = [t for t in task_descrs if not t.is_one_day_task()]
   451         inday_tasks.sort(key=lambda t:t.task.start)
   451         inday_tasks.sort(key=lambda t:t.task.start)