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'))
Exemplo n.º 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'))
Exemplo n.º 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'),
            }
Exemplo n.º 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'),
            }
Exemplo n.º 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())
Exemplo n.º 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())
Exemplo n.º 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
Exemplo n.º 9
0
 def updateFieldsFromSchemata(self):
     super(SelectTemplateDocumentWizardStep,
           self).updateFieldsFromSchemata()
     if not is_contact_feature_enabled():
         self.fields = self.fields.omit('recipient')
Exemplo n.º 10
0
 def steps(self):
     if not is_contact_feature_enabled():
         return []
     return [('select-document', _(u'Select document')),
             ('select-address', _(u'Select recipient address'))]
Exemplo n.º 11
0
 def filter_type(fti):
     if fti.id == "opengever.contact.contact":
         return not is_contact_feature_enabled()
     return True
Exemplo n.º 12
0
 def filter_type(fti):
     if fti.id == "opengever.contact.contact":
         return not is_contact_feature_enabled()
     return True
Exemplo n.º 13
0
 def updateFieldsFromSchemata(self):
     super(SelectTemplateDocumentWizardStep, self).updateFieldsFromSchemata()
     if not is_contact_feature_enabled():
         self.fields = self.fields.omit('recipient')
Exemplo n.º 14
0
 def steps(self):
     if not is_contact_feature_enabled():
         return []
     return [('select-document', _(u'Select document')),
             ('select-address', _(u'Select recipient address'))]