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)
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)
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)
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)
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)