Example #1
0
def _extend_event_management_menu(sender, event, **kwargs):
    if not get_vc_plugins():
        return
    if not event.can_manage(session.user, allow_key=True):
        return
    return SideMenuItem('videoconference', _('Videoconference'), url_for('vc.manage_vc_rooms', event),
                        section='services')
Example #2
0
def _extend_event_management_menu(sender, event, **kwargs):
    if not get_vc_plugins():
        return
    if not event.can_manage(session.user):
        return
    return SideMenuItem('videoconference', _('Videoconference'), url_for('vc.manage_vc_rooms', event),
                        section='services')
Example #3
0
 def _process(self):
     action = request.args.get('vc_room_action', '.manage_vc_rooms_create')
     attach = request.args.get('attach', '')
     return jsonify_template('vc/manage_event_select.html',
                             event=self.event,
                             vc_room_action=action,
                             plugins=get_vc_plugins().values(),
                             attach=attach)
Example #4
0
 def _process(self):
     action = request.args.get('vc_room_action', '.manage_vc_rooms_create')
     return WPVCManageEvent.render_template(
         'manage_event_select.html',
         self._conf,
         vc_room_action=action,
         event=self._conf,
         plugins=get_vc_plugins().values())
Example #5
0
def _extend_event_management_menu(sender, event, **kwargs):
    if not get_vc_plugins():
        return
    if not event.can_manage(session.user):
        return
    return SideMenuItem(
        "videoconference", _("Videoconference"), url_for("vc.manage_vc_rooms", event), section="services"
    )
Example #6
0
 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)
Example #7
0
 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)
Example #8
0
 def _process(self):
     action = request.args.get("vc_room_action", ".manage_vc_rooms_create")
     attach = request.args.get("attach", "")
     return WPVCManageEvent.render_template(
         "manage_event_select.html",
         self._conf,
         vc_room_action=action,
         event=self.event_new,
         plugins=get_vc_plugins().values(),
         attach=attach,
     )
Example #9
0
 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)
Example #10
0
 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(),
     )
Example #11
0
 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())
Example #12
0
 def _visible(event):
     return bool(get_vc_plugins()) and VCRoomEventAssociation.find_for_event(event).has_rows()
Example #13
0
 def _process_args(self):
     RHVCManageEventBase._process_args(self)
     try:
         self.plugin = get_vc_plugins()[request.view_args['service']]
     except KeyError:
         raise NotFound
Example #14
0
 def _checkParams(self, params):
     RHVCManageEventBase._checkParams(self, params)
     try:
         self.plugin = get_vc_plugins()[request.view_args['service']]
     except KeyError:
         raise NotFound
Example #15
0
 def plugin(self):
     from indico.modules.vc.util import get_vc_plugins
     return get_vc_plugins().get(self.type)
Example #16
0
def _extend_event_management_menu(event, **kwargs):
    return 'vc', SideMenuItem('Video Conference', url_for('vc.manage_vc_rooms', event),
                              visible=bool(get_vc_plugins()) and event.canModify(session.user))
Example #17
0
 def _visible(event):
     return bool(get_vc_plugins()) and bool(VCRoomEventAssociation.find_for_event(event).count())
Example #18
0
 def _visible(event):
     return bool(get_vc_plugins()) and VCRoomEventAssociation.find_for_event(event).has_rows()
Example #19
0
 def _visible(event):
     return bool(get_vc_plugins()) and bool(
         VCRoomEventAssociation.find_for_event(event).count())
Example #20
0
 def is_visible(self):
     return bool(get_vc_plugins())
Example #21
0
 def _visible(event):
     if event.has_legacy_id:
         return False
     return bool(get_vc_plugins()) and bool(VCRoomEventAssociation.find_for_event(event).count())
Example #22
0
 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()))
Example #23
0
 def _checkParams(self, params):
     RHVCManageEventBase._checkParams(self, params)
     try:
         self.plugin = get_vc_plugins().get(request.view_args['service'])
     except KeyError:
         raise NotFound
Example #24
0
def _extend_event_management_menu(event, **kwargs):
    return 'vc', SideMenuItem(_('Videoconference'), url_for('vc.manage_vc_rooms', event),
                              visible=bool(get_vc_plugins()) and event.canModify(session.avatar))
Example #25
0
 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()))
Example #26
0
 def _process_args(self):
     RHVCManageEventBase._process_args(self)
     try:
         self.plugin = get_vc_plugins()[request.view_args['service']]
     except KeyError:
         raise NotFound
Example #27
0
 def _process(self):
     action = request.args.get('vc_room_action', '.manage_vc_rooms_create')
     attach = request.args.get('attach', '')
     return WPVCManageEvent.render_template('manage_event_select.html', self._conf, vc_room_action=action,
                                            event=self.event_new, plugins=get_vc_plugins().values(), attach=attach)
Example #28
0
 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())
Example #29
0
 def plugin(self):
     from indico.modules.vc.util import get_vc_plugins
     return get_vc_plugins().get(self.type)
Example #30
0
 def _process(self):
     action = request.args.get('vc_room_action', '.manage_vc_rooms_create')
     attach = request.args.get('attach', '')
     return jsonify_template('vc/manage_event_select.html', event=self.event, vc_room_action=action,
                             plugins=get_vc_plugins().values(), attach=attach)