コード例 #1
0
ファイル: manage.py プロジェクト: ipaste/indico
 def _process(self):
     event_info = serialize_event_info(self.event)
     timetable_data = TimetableSerializer(
         self.event, management=True).serialize_timetable()
     return WPManageTimetable.render_template('management.html',
                                              self.event,
                                              event_info=event_info,
                                              timetable_data=timetable_data)
コード例 #2
0
ファイル: util.py プロジェクト: vireshbackup/indico
def render_session_timetable(session, timetable_layout=None, management=False):
    if not session.start_dt:
        # no scheduled sessions present
        return ''
    timetable_data = TimetableSerializer().serialize_session_timetable(session, without_blocks=True,
                                                                       strip_empty_days=True)
    event_info = serialize_event_info(session.event_new)
    tpl = get_template_module('events/timetable/_timetable.html')
    return tpl.render_timetable(timetable_data, event_info, timetable_layout=timetable_layout, management=management)
コード例 #3
0
ファイル: util.py プロジェクト: OmeGak/indico
def render_session_timetable(session, timetable_layout=None, management=False):
    if not session.start_dt:
        # no scheduled sessions present
        return ''
    timetable_data = TimetableSerializer().serialize_session_timetable(session, without_blocks=True,
                                                                       strip_empty_days=True)
    event_info = serialize_event_info(session.event_new)
    tpl = get_template_module('events/timetable/_timetable.html')
    return tpl.render_timetable(timetable_data, event_info, timetable_layout=timetable_layout, management=management)
コード例 #4
0
ファイル: manage.py プロジェクト: DirkHoffmann/indico
 def _process(self):
     event_info = serialize_event_info(self.event)
     event_info['timetableSession'] = serialize_session(self.session)
     timetable_data = TimetableSerializer(self.event, management=True).serialize_session_timetable(self.session)
     management_rights = {
         'can_manage_event': self.event.can_manage(session.user),
         'can_manage_session': self.session.can_manage(session.user),
         'can_manage_blocks': self.session.can_manage_blocks(session.user),
         'can_manage_contributions': self.session.can_manage_contributions(session.user)
     }
     return WPManageTimetable.render_template('session_management.html', self.event, event_info=event_info,
                                              timetable_data=timetable_data, session_=self.session,
                                              **management_rights)
コード例 #5
0
ファイル: manage.py プロジェクト: wtakase/indico
 def _process(self):
     event_info = serialize_event_info(self.event_new)
     event_info['timetableSession'] = serialize_session(self.session)
     timetable_data = TimetableSerializer(management=True).serialize_session_timetable(self.session)
     management_rights = {
         'can_manage_event': self.event_new.can_manage(session.user),
         'can_manage_session': self.session.can_manage(session.user),
         'can_manage_blocks': self.session.can_manage_blocks(session.user),
         'can_manage_contributions': self.session.can_manage_contributions(session.user)
     }
     return WPManageTimetable.render_template('session_management.html', self._conf, event_info=event_info,
                                              timetable_data=timetable_data, session_=self.session,
                                              **management_rights)
コード例 #6
0
ファイル: manage.py プロジェクト: DirkHoffmann/indico
 def _process(self):
     event_info = serialize_event_info(self.event)
     timetable_data = TimetableSerializer(self.event, management=True).serialize_timetable()
     return WPManageTimetable.render_template('management.html', self.event, event_info=event_info,
                                              timetable_data=timetable_data)