Changeset 4e85d600f1de1c5d436e7c313e857864685d87d4 in indico


Ignore:
Timestamp:
01/10/12 11:56:28 (4 months ago)
Author:
Alberto Resco Perez <alberto.resco.perez@…>
Children:
d000ed6e4ca1695ad7169e63ab4b8fbdb90d9ff7
Parents:
d250c39ec10423159d3ee0c682970922ad5c9d5b
git-author:
Alberto Resco Perez <alberto.resco.perez@…> (01/10/12 11:56:28)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (01/16/12 10:31:34)
Message:

[IMP] Do not show TT in weekends if no entries

  • If no entries are in the weekends do not add to the dictionary.
Location:
indico/MaKaC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/schedule.py

    r05eb0f r4e85d60  
    14861486 
    14871487    @staticmethod 
    1488     def process(schedule, tz, aw, days = None, mgmtMode = False, useAttrCache = False): 
     1488    def process(schedule, tz, aw, days = None, mgmtMode = False, useAttrCache = False, hideWeekends = False): 
    14891489 
    14901490        scheduleDict={} 
     
    15081508                if day in dates: 
    15091509                    scheduleDict[day][genId] = resultData 
     1510        if hideWeekends: 
     1511            for entry in scheduleDict.keys(): 
     1512                weekDay = datetime.strptime(entry, "%Y%m%d").weekday() 
     1513                if scheduleDict[entry] == {} and (weekDay == 5 or weekDay == 6): 
     1514                    del scheduleDict[entry] 
    15101515 
    15111516        return scheduleDict 
  • indico/MaKaC/webinterface/pages/conferences.py

    rd9e5b0 r4e85d60  
    14521452        vars["ttdata"] = json.dumps(schedule.ScheduleToJson.process(self._conf.getSchedule(), 
    14531453                                                                          tz, self._aw, 
    1454                                                                           useAttrCache = True)) 
     1454                                                                          useAttrCache = True, 
     1455                                                                          hideWeekends = True)) 
    14551456        eventInfo = fossilize(self._conf, IConferenceEventInfoFossil, tz = tz) 
    14561457        eventInfo['isCFAEnabled'] = self._conf.getAbstractMgr().isActive() 
Note: See TracChangeset for help on using the changeset viewer.