Exemple #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')
Exemple #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')
Exemple #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)
Exemple #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())
Exemple #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"
    )
Exemple #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)
Exemple #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)
Exemple #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,
     )
Exemple #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)
Exemple #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(),
     )
Exemple #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())
Exemple #12
0
 def _visible(event):
     return bool(get_vc_plugins()) and VCRoomEventAssociation.find_for_event(event).has_rows()
Exemple #13
0
 def _process_args(self):
     RHVCManageEventBase._process_args(self)
     try:
         self.plugin = get_vc_plugins()[request.view_args['service']]
     except KeyError:
         raise NotFound
Exemple #14
0
 def _checkParams(self, params):
     RHVCManageEventBase._checkParams(self, params)
     try:
         self.plugin = get_vc_plugins()[request.view_args['service']]
     except KeyError:
         raise NotFound
Exemple #15
0
 def plugin(self):
     from indico.modules.vc.util import get_vc_plugins
     return get_vc_plugins().get(self.type)
Exemple #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))
Exemple #17
0
 def _visible(event):
     return bool(get_vc_plugins()) and bool(VCRoomEventAssociation.find_for_event(event).count())
Exemple #18
0
 def _visible(event):
     return bool(get_vc_plugins()) and VCRoomEventAssociation.find_for_event(event).has_rows()
Exemple #19
0
 def _visible(event):
     return bool(get_vc_plugins()) and bool(
         VCRoomEventAssociation.find_for_event(event).count())
Exemple #20
0
 def is_visible(self):
     return bool(get_vc_plugins())
Exemple #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())
Exemple #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()))
Exemple #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
Exemple #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))
Exemple #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()))
Exemple #26
0
 def _process_args(self):
     RHVCManageEventBase._process_args(self)
     try:
         self.plugin = get_vc_plugins()[request.view_args['service']]
     except KeyError:
         raise NotFound
Exemple #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)
Exemple #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())
Exemple #29
0
 def plugin(self):
     from indico.modules.vc.util import get_vc_plugins
     return get_vc_plugins().get(self.type)
Exemple #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)