Beispiel #1
0
    def getEventDisplays(self):
        """ gathers event-like objects from an event provider """
        occurrences = self.getOccurrencesInDay(self.today)
        displays = [getMultiAdapter([occurrence, self], IEventDisplay) for occurrence in occurrences]

        # Handle overlapping displays:
        daygrid = DayGrid(0, 0, self.height, self.day_width)
        daygrid.extend(displays)
        daygrid.flatten()

        return daygrid
Beispiel #2
0
 def getEventDisplays(self):
     all_displays = []
     for d in self.getWeekdays():
         day = self.getDateForWeekday(d)
         self.column_day = day
         occurrences = self.getOccurrencesInDay(day)
         displays = [getMultiAdapter([occurrence, self], IEventDisplay) for
                     occurrence in occurrences]
         
         # Handle overlapping displays:
         daygrid = DayGrid(0, self.day_width * (d-1), 
                              self.height,
                              self.day_width)
         daygrid.extend(displays)
         daygrid.flatten()
         all_displays.extend(daygrid)
         
     return all_displays