def _inject_conference_home(event, **kwargs): if not layout_settings.get(event, 'show_vc_rooms'): return res = VCRoomEventAssociation.find_for_event(event, only_linked_to_event=True) event_vc_rooms = [event_vc_room for event_vc_room in res.all() if event_vc_room.vc_room.plugin is not None] if event_vc_rooms: return render_template('vc/conference_home.html', event=event, event_vc_rooms=event_vc_rooms)
def _session_slot_deleted(session_slot, **kwargs): event = session_slot.getConference() for event_vc_room in VCRoomEventAssociation.find_for_event( event, include_hidden=True, include_deleted=True): if event_vc_room.link_object is None: event_vc_room.link_type = VCRoomLinkType.event event_vc_room.link_id = None
def _session_slot_deleted(session_slot, **kwargs): event = session_slot.getConference() if event.has_legacy_id: return for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True): if event_vc_room.link_object is None: event_vc_room.link_type = VCRoomLinkType.event event_vc_room.link_id = None
def _contrib_deleted(contrib, **kwargs): event = contrib.getConference() if not event.id.isdigit(): return for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True): if event_vc_room.link_object is None: event_vc_room.link_type = VCRoomLinkType.event event_vc_room.link_id = None
def _contrib_deleted(contrib, **kwargs): event = contrib.getConference() if not event.id.isdigit(): return for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True): if event_vc_room.link_object is None: event_vc_room.link_type = VCRoomLinkType.event event_vc_room.link_id = None
def _process(self): try: room_event_assocs = VCRoomEventAssociation.find_for_event(self._conf, include_hidden=True, include_deleted=True).all() except ValueError: raise IndicoError(_('This page is not available for legacy events.')) event_vc_rooms = [event_vc_room for event_vc_room in room_event_assocs if event_vc_room.vc_room.plugin] return WPVCManageEvent.render_template('manage_event.html', self._conf, event=self._conf, event_vc_rooms=event_vc_rooms, plugins=get_vc_plugins().values())
def _process(self): event_vc_rooms = VCRoomEventAssociation.find_for_event(self._conf).all() vc_plugins_available = True if get_vc_plugins() else False linked_to = defaultdict(lambda: defaultdict(list)) for event_vc_room in event_vc_rooms: if event_vc_room.vc_room.plugin: linked_to[event_vc_room.link_type.name][event_vc_room.link_object].append(event_vc_room) return WPVCEventPage.render_template('event_vc.html', self._conf, event=self._conf, event_vc_rooms=event_vc_rooms, linked_to=linked_to, vc_plugins_available=vc_plugins_available)
def _process(self): event_vc_rooms = VCRoomEventAssociation.find_for_event(self.event_new).all() vc_plugins_available = bool(get_vc_plugins()) linked_to = defaultdict(lambda: defaultdict(list)) for event_vc_room in event_vc_rooms: if event_vc_room.vc_room.plugin: linked_to[event_vc_room.link_type.name][event_vc_room.link_object].append(event_vc_room) return WPVCEventPage.render_template('event_vc.html', self._conf, event=self.event_new, event_vc_rooms=event_vc_rooms, linked_to=linked_to, vc_plugins_available=vc_plugins_available)
def _process(self): event_vc_rooms = [event_vc_room for event_vc_room in VCRoomEventAssociation.find_for_event(self.event).all() if event_vc_room.vc_room.plugin] vc_plugins_available = bool(get_vc_plugins()) linked_to = defaultdict(lambda: defaultdict(list)) for event_vc_room in event_vc_rooms: linked_to[event_vc_room.link_type.name][event_vc_room.link_object].append(event_vc_room) return WPVCEventPage.render_template('event_vc.html', self.event, event_vc_rooms=event_vc_rooms, linked_to=linked_to, vc_plugins_available=vc_plugins_available)
def _inject_event_header(event, **kwargs): res = VCRoomEventAssociation.find_for_event(event, only_linked_to_event=True) event_vc_rooms = [ event_vc_room for event_vc_room in res.all() if event_vc_room.vc_room.plugin is not None ] if event_vc_rooms: return render_template('vc/event_header.html', event=event, event_vc_rooms=event_vc_rooms)
def clone(self, new_event, options): if 'vc_rooms' not in options: return for old_event_vc_room in VCRoomEventAssociation.find_for_event(self.event, include_hidden=True): event_vc_room = VCRoomEventAssociation(event_id=int(new_event.id), link_type=old_event_vc_room.link_type, link_id=old_event_vc_room.link_id, show=old_event_vc_room.show, data=old_event_vc_room.data) if event_vc_room.link_object is not None: event_vc_room.vc_room = old_event_vc_room.vc_room db.session.add(event_vc_room)
def clone(self, new_event, options): if 'vc_rooms' not in options: return for old_event_vc_room in VCRoomEventAssociation.find_for_event(self.event, include_hidden=True): event_vc_room = VCRoomEventAssociation(event_id=int(new_event.id), link_type=old_event_vc_room.link_type, link_id=old_event_vc_room.link_id, show=old_event_vc_room.show, data=old_event_vc_room.data) if event_vc_room.link_object is not None: event_vc_room.vc_room = old_event_vc_room.vc_room db.session.add(event_vc_room)
def _process(self): room_event_assocs = VCRoomEventAssociation.find_for_event( self.event, include_hidden=True, include_deleted=True).all() event_vc_rooms = [ event_vc_room for event_vc_room in room_event_assocs if event_vc_room.vc_room.plugin ] return WPVCManageEvent.render_template( 'manage_event.html', self.event, event_vc_rooms=event_vc_rooms, plugins=get_vc_plugins().values())
def _process(self): room_event_assocs = VCRoomEventAssociation.find_for_event( self.event_new, include_hidden=True, include_deleted=True ).all() event_vc_rooms = [event_vc_room for event_vc_room in room_event_assocs if event_vc_room.vc_room.plugin] return WPVCManageEvent.render_template( "manage_event.html", self._conf, event=self.event_new, event_vc_rooms=event_vc_rooms, plugins=get_vc_plugins().values(), )
def _inject_event_header(event, **kwargs): res = VCRoomEventAssociation.find_for_event(event, only_linked_to_event=True) event_vc_rooms = [event_vc_room for event_vc_room in res.all() if event_vc_room.vc_room.plugin is not None] if event_vc_rooms: return render_template('vc/event_header.html', event=event, event_vc_rooms=event_vc_rooms)
def get_options(self): enabled = bool(VCRoomEventAssociation.find_for_event(self.event, include_hidden=True).count()) return {'vc_rooms': (_('Video conference rooms'), enabled, True)}
def _event_deleted(event, **kwargs): user = session.user if has_request_context() and session.user else User.get_system_user() for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True): event_vc_room.delete(user)
def _visible(event): return bool(get_vc_plugins()) and VCRoomEventAssociation.find_for_event(event).has_rows()
def _event_deleted(event, **kwargs): if not event.id.isdigit(): return for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True): event_vc_room.delete(_get_user())
def _event_deleted(event, **kwargs): user = session.user if has_request_context( ) and session.user else User.get(Config.getInstance().getJanitorUserId()) for event_vc_room in VCRoomEventAssociation.find_for_event( event, include_hidden=True, include_deleted=True): event_vc_room.delete(user)
def _visible(event): return bool(get_vc_plugins()) and VCRoomEventAssociation.find_for_event(event).has_rows()
def _event_deleted(event, **kwargs): user = session.user if has_request_context() and session.user else User.get_system_user() for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True): event_vc_room.delete(user)
def _visible(event): if not event.id.isdigit(): return False return (bool(get_vc_plugins()) and bool(VCRoomEventAssociation.find_for_event(event, only_linked_to_event=True).count()))
def _event_deleted(event, **kwargs): user = session.user if has_request_context() and session.user else User.get(Config.getInstance().getJanitorUserId()) for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True): event_vc_room.delete(user)
def _visible(event): return bool(get_vc_plugins()) and bool(VCRoomEventAssociation.find_for_event(event).count())
def _visible(event): if not event.id.isdigit(): return False return (bool(get_vc_plugins()) and bool(VCRoomEventAssociation.find_for_event(event, only_linked_to_event=True).count()))
def _event_deleted(event, **kwargs): if not event.id.isdigit(): return for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True): event_vc_room.delete(_get_user())
def get_options(self): enabled = bool( VCRoomEventAssociation.find_for_event(self.event, include_hidden=True).count()) return {'vc_rooms': (_('Videoconference rooms'), enabled, True)}
def _visible(event): if event.has_legacy_id: return False return bool(get_vc_plugins()) and bool(VCRoomEventAssociation.find_for_event(event).count())
def _visible(event): return bool(get_vc_plugins()) and bool( VCRoomEventAssociation.find_for_event(event).count())