Пример #1
0
 def addCheckBox2CloneConf(cls, obj, list):
     """ we show the clone checkbox if:
         * The Vidyo Plugin is active.
         * There are vidyo services in the event created by the user who wants to clone
     """
     #list of creators of the chat rooms
     if PluginsWrapper('Collaboration', 'Vidyo').isActive() and len(Catalog.getIdx("cs_bookingmanager_conference").get(obj._conf.getId()).getBookingList(filterByType="Vidyo")) !=0:
         list['cloneOptions'] += _("""<li><input type="checkbox" name="cloneVidyo" id="cloneVidyo" value="1" checked="checked"/>Vidyo</li>""")
Пример #2
0
 def addCheckBox2CloneConf(cls, obj, list):
     """ we show the clone checkbox if:
         * The XMPP Plugin is active.
         * There are rooms in the event created by the user who wants to clone
     """
     #list of creators of the chat rooms
     if PluginsWrapper('InstantMessaging', 'XMPP').isActive():
         list['cloneOptions'] += '<li><input type="checkbox" name="cloneChatrooms"' \
             ' id="cloneChatrooms" value="1" />{0}</li>'.format(_("Chat Rooms"))
Пример #3
0
 def addCheckBox2CloneConf(cls, obj, list):
     """ we show the clone checkbox if:
         * The XMPP Plugin is active.
         * There are rooms in the event created by the user who wants to clone
     """
     #list of creators of the chat rooms
     ownersList = [
         cr.getOwner() for cr in DBHelpers().getChatroomList(obj._conf)
     ]
     if PluginsWrapper(
             'InstantMessaging',
             'XMPP').isActive() and obj._rh._aw._currentUser in ownersList:
         list['cloneOptions'] += i18nformat(
             """<li><input type="checkbox" name="cloneChatrooms" id="cloneChatrooms" value="1" />_("Chat Rooms")</li>"""
         )
Пример #4
0
    def cloneEvent(cls, confToClone, params):
        """ we'll clone only the chat rooms created by the user who is cloning the conference """
        conf = params['conf']
        user = params['user']
        options = params['options']

        if options.get("chatrooms", True):
            crList = DBHelpers().getChatroomList(confToClone)
            ownersList = [cr.getOwner() for cr in crList]
            if PluginsWrapper('InstantMessaging', 'XMPP').isActive():
                for cr in crList:
                    if user is cr.getOwner():
                        cls()._notify('addConference2Room', {
                            'room': cr,
                            'conf': conf.getId(),
                            'clone': True
                        })