def __call__(self):
        if is_contact_feature_enabled():
            return self.request.RESPONSE.redirect(
                self.get_url('add-sql-participation'))

        return self.request.response.redirect(
            self.get_url('add-plone-participation'))
예제 #2
0
    def get_tabs(self):
        if is_contact_feature_enabled():
            tabs = [
                {'id': 'persons',
                 'title': _(u'label_persons', default=u'Persons'),
                 'icon': None,
                 'url': '#',
                 'class': None},
                {'id': 'organizations',
                 'title': _(u'label_organizations', default=u'Organizations'),
                 'icon': None,
                 'url': '#',
                 'class': None}]

        else:
            tabs = [
                {'id': 'local',
                 'title': _(u'label_local', default=u'Local'),
                 'icon': None,
                 'url': '#',
                 'class': None},
            ]

        tabs += [
            {'id': 'users',
             'title': _(u'label_users', default=u'Users'),
             'icon': None,
             'url': '#',
             'class': None}]

        return tabs
    def __call__(self):
        if is_contact_feature_enabled():
            return self.request.RESPONSE.redirect(
                self.get_url('add-sql-participation'))

        return self.request.response.redirect(
            self.get_url('add-plone-participation'))
예제 #4
0
    def participations_tab(self):
        if is_contact_feature_enabled():
            return {
                'id': 'participations',
                'title': _(u'label_participations', default=u'Participations'),
                }

        return {
            'id': 'participants',
            'title': _(u'label_participants', default=u'Participants'),
            }
예제 #5
0
    def participations_tab(self):
        if is_contact_feature_enabled():
            return {
                'id': 'participations',
                'title': _(u'label_participations', default=u'Participations'),
                }

        return {
            'id': 'participants',
            'title': _(u'label_participants', default=u'Participants'),
            }
예제 #6
0
    def make_participation_box(self):
        if is_contact_feature_enabled():
            return dict(id='participations',
                        content=self.sql_participations(),
                        href='participations',
                        label=_("Participations"),
                        available=self.context.has_participation_support())

        else:
            return dict(id='participants',
                        content=self.plone_participations(),
                        href='participants',
                        label=_("Participants"),
                        available=self.context.has_participation_support())
예제 #7
0
    def make_participation_box(self):
        if is_contact_feature_enabled():
            return dict(id='participations',
                        content=self.sql_participations(),
                        href='participations',
                        label=_("Participations"),
                        available=self.context.has_participation_support())

        else:
            return dict(id='participants',
                        content=self.plone_participations(),
                        href='participants',
                        label=_("Participants"),
                        available=self.context.has_participation_support())
예제 #8
0
 def updateWidgets(self, prefix=None):
     super(ManualJournalEntryAddForm, self).updateWidgets(prefix=prefix)
     if not is_contact_feature_enabled():
         self.widgets['contacts'].mode = HIDDEN_MODE
예제 #9
0
 def updateFieldsFromSchemata(self):
     super(SelectTemplateDocumentWizardStep,
           self).updateFieldsFromSchemata()
     if not is_contact_feature_enabled():
         self.fields = self.fields.omit('recipient')
예제 #10
0
 def steps(self):
     if not is_contact_feature_enabled():
         return []
     return [('select-document', _(u'Select document')),
             ('select-address', _(u'Select recipient address'))]
예제 #11
0
 def filter_type(fti):
     if fti.id == "opengever.contact.contact":
         return not is_contact_feature_enabled()
     return True
예제 #12
0
 def filter_type(fti):
     if fti.id == "opengever.contact.contact":
         return not is_contact_feature_enabled()
     return True
예제 #13
0
 def updateFieldsFromSchemata(self):
     super(SelectTemplateDocumentWizardStep, self).updateFieldsFromSchemata()
     if not is_contact_feature_enabled():
         self.fields = self.fields.omit('recipient')
예제 #14
0
 def steps(self):
     if not is_contact_feature_enabled():
         return []
     return [('select-document', _(u'Select document')),
             ('select-address', _(u'Select recipient address'))]