Exemplo n.º 1
0
def update_item_schema(baseSchema):

    specificSchema = Schema((TextField(
        name='bourgmestreObservations',
        widget=RichWidget(
            label_msgid="PloneMeeting_bourgmestreObservations",
            description_msgid="bourgmestre_observations_descr",
            condition="python: here.attributeIsUsed('bourgmestreObservations')",
            rows=20,
            label='BourgmestreObservations',
            i18n_domain='PloneMeeting',
        ),
        default_content_type="text/html",
        read_permission=
        "PloneMeeting: Write item MeetingManager reserved fields",
        searchable=False,
        allowable_content_types=('text/html', ),
        default_output_type="text/x-html-safe",
        optional=True,
        write_permission=
        "PloneMeeting: Write item MeetingManager reserved fields",
    ), ), )

    completeItemSchema = baseSchema + specificSchema.copy()
    return completeItemSchema
Exemplo n.º 2
0
def update_meeting_schema(baseSchema):
    specificSchema = Schema((DataGridField(
        name='sections',
        widget=DataGridField._properties['widget'](
            description="Commissions",
            description_msgid="commissions_descr",
            condition=
            "python: here.portal_type in ('MeetingCouncil', 'MeetingZCouncil')",
            columns={
                'name_section':
                SelectColumn("Commission name",
                             vocabulary="listSections",
                             col_description="Select the commission name."),
                'date_section':
                Column("Commission date",
                       col_description="Enter valid from date, "
                       "use following format : DD/MM/YYYY."),
            },
            label='Commissions',
            label_msgid='MeetingSeraing_label_commissions',
            i18n_domain='PloneMeeting',
        ),
        allow_oddeven=True,
        write_permission="Modify portal content",
        columns=('name_section', 'date_section'),
        allow_empty_rows=False,
    ), ), )

    completeSchema = baseSchema + specificSchema.copy()

    baseSchema[
        'notes'].widget.description_msgid = "MeetingSeraing_descr_meeting_notes"
    baseSchema[
        'notes'].widget.label_msgid = "MeetingSeraing_msgid_meeting_notes"
    return completeSchema
Exemplo n.º 3
0
def update_meeting_schema(baseSchema):
    specificSchema = Schema((
        IntegerField(
            name='meetingNumberInParliamentaryTerm',
            default=-1,
            widget=IntegerField._properties['widget'](
                label='Meetingnumberinparliamentaryterm',
                label_msgid=
                'MeetingAndenne_label_meetingNumberInParliamentaryTerm',
                i18n_domain='PloneMeeting',
            ),
            write_permission="Manage portal",
        ),
        TextField(
            name='postObservations',
            allowable_content_types=('text/html', ),
            widget=RichWidget(
                condition="python: here.showObs('postObservations')",
                rows=15,
                label='Postobservations',
                label_msgid='MeetingAndenne_label_postObservations',
                i18n_domain='PloneMeeting',
            ),
            default_content_type="text/html",
            default_output_type="text/x-html-safe",
            optional=True,
        ),
    ), )

    completeMeetingSchema = baseSchema + specificSchema.copy()
    completeMeetingSchema.moveField('postObservations', after='observations')

    return completeMeetingSchema
Exemplo n.º 4
0
def update_item_schema(baseSchema):

    specificSchema = Schema(
        (

            #specific field for Mons added possibility to BudgetImpactReviewer to "validate item"
            BooleanField(
                name='validateByBudget',
                widget=BooleanField._properties['widget'](
                    condition="python: here.attributeIsUsed('budgetInfos') and (\
                            here.portal_membership.getAuthenticatedMember().has_role('MeetingBudgetImpactReviewer', \
                            here) or here.portal_membership.getAuthenticatedMember().has_role(' \
                            MeetingExtraordinaryBudget', here) or here.portal_plonemeeting.isManager(here))",
                    label='ValidateByBudget',
                    label_msgid='MeetingMons_label_validateByBudget',
                    description='Validate By Budget Impact Reviwer',
                    description_msgid='MeetingMons_descr_validateByBudget',
                    i18n_domain='PloneMeeting',
                ),
            ), ), )

    baseSchema['description'].widget.label = "projectOfDecision"
    baseSchema['description'].widget.label_msgid = "projectOfDecision_label"
    baseSchema['motivation'].widget.description_msgid = "item_motivation_descr"
    baseSchema['observations'].write_permission = "Modify portal content"

    completeItemSchema = baseSchema + specificSchema.copy()
    return completeItemSchema
Exemplo n.º 5
0
def update_meeting_schema(baseSchema):
    specificSchema = Schema((), )

    baseSchema['assembly'].widget.description_msgid = "assembly_meeting_descr"

    completeSchema = baseSchema + specificSchema.copy()
    return completeSchema
Exemplo n.º 6
0
def update_item_schema(baseSchema):

    specificSchema = Schema((), )

    ContactSchema = baseSchema + specificSchema.copy()

    # remove fax field
    ContactSchema.delField('fax')

    return ContactSchema
Exemplo n.º 7
0
def update_group_schema(baseSchema):
    specificSchema = Schema(
        (BooleanField(name='usePrevalidation',
                      widget=BooleanField._properties['widget'](
                          label='Useprevalidation',
                          label_msgid='MeetingAndenne_label_usePrevalidation',
                          i18n_domain='PloneMeeting',
                      ),
                      default=False), ), )

    completeGroupSchema = baseSchema + specificSchema.copy()

    return completeGroupSchema
Exemplo n.º 8
0
def update_item_schema(baseSchema):
    specificSchema = Schema((
        TextField(
            name='internalCommunication',
            widget=RichWidget(
                condition="python: here.portal_plonemeeting.isManager(here)",
                description="InternalCommunication",
                description_msgid="item_internalCommunication_descr",
                label='InternalCommunication',
                label_msgid='PloneMeeting_label_internalCommunication',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
            default_content_type="text/html",
            allowable_content_types=('text/html', ),
            default_output_type="text/x-html-safe",
        ),
        ReferenceField(
            name='strategicAxis',
            keepReferencesOnCopy=True,
            widget=ReferenceBrowserWidget(
                description="StrategicAxis",
                description_msgid="item_strategicAxis_descr",
                condition="python: here.attributeIsUsed('strategicAxis')",
                allow_search=True,
                allow_browse=False,
                startup_directory_method="classifierStartupDirectory",
                force_close_on_insert=False,
                restrict_browsing_to_startup_directory=True,
                base_query="classifierBaseQuery",
                show_results_without_query=True,
                label='StrategicAxis',
                label_msgid='PloneMeeting_label_strategicAxis',
                i18n_domain='PloneMeeting',
            ),
            multiValued=True,
            relationship="ItemStrategicAxis",
            allowed_types=('MeetingCategory', ),
            optional=True,
        ),
    ))

    baseSchema[
        'detailedDescription'].widget.description = "DetailedDescriptionMethode"
    baseSchema[
        'detailedDescription'].widget.description_msgid = "detailedDescription_item_descr"
    completeItemSchema = baseSchema + specificSchema.copy()
    completeItemSchema.moveField('strategicAxis', after='detailedDescription')
    return completeItemSchema
Exemplo n.º 9
0
def update_config_schema(baseSchema):
    specificSchema = Schema((BooleanField(
        name='initItemDecisionIfEmptyOnDecide',
        default=True,
        widget=BooleanField._properties['widget']
        (description="InitItemDecisionIfEmptyOnDecide",
         description_msgid="init_item_decision_if_empty_on_decide",
         label='Inititemdecisionifemptyondecide',
         label_msgid='MeetingCommunes_label_initItemDecisionIfEmptyOnDecide',
         i18n_domain='PloneMeeting'),
        write_permission=WriteRiskyConfig,
    ), ), )

    completeConfigSchema = baseSchema + specificSchema.copy()
    return completeConfigSchema
Exemplo n.º 10
0
def update_meetingconfig_schema(baseSchema):
    specificSchema = Schema((LinesField(
        name='transitionsReinitializingTakenOverBy',
        default=[],
        widget=InAndOutWidget(
            label='TransitionsReinitializingTakenOverBy',
            label_msgid=
            'MeetingSeraing_label_transitions_reinitializing_taken_over_by',
            i18n_domain='PloneMeeting',
        ),
        write_permission=WriteRiskyConfig,
        vocabulary='listEveryItemTransitions',
    ), ), )
    completeSchema = baseSchema + specificSchema.copy()
    return completeSchema
Exemplo n.º 11
0
def update_config_schema(baseSchema):
    specificSchema = Schema((
        IntegerField(
            name='lastMeetingNumberInParliamentaryTerm',
            default=0,
            widget=IntegerField._properties['widget'](
                description="LastMeetingNumberInParliamentaryTerm",
                description_msgid=
                "last_meeting_number_in_parliamentary_term_descr",
                label='Lastmeetingnumberinparliamentaryterm',
                label_msgid=
                'MeetingAndenne_label_lastMeetingNumberInParliamentaryTerm',
                i18n_domain='PloneMeeting',
            ),
            write_permission=WriteRiskyConfig,
        ),
        BooleanField(
            name='useSubCategories',
            default=False,
            widget=BooleanField._properties['widget'](
                description="UseSubCategories",
                description_msgid="use_sub_categories_descr",
                label='Usesubcategories',
                label_msgid='MeetingAndenne_label_useSubCategories',
                i18n_domain='PloneMeeting'),
            write_permission=WriteRiskyConfig,
        ),
        LinesField(
            name='selectableAssociatedGroups',
            widget=MultiSelectionWidget(
                size=20,
                description="SelectableAssociatedGroups",
                description_msgid="selectable_associated_groups_descr",
                label='Selectableassociatedgroups',
                label_msgid='MeetingAndenne_label_selectableAssociatedGroups',
                i18n_domain='PloneMeeting',
            ),
            schemata="advices",
            multiValued=1,
            vocabulary='listSelectableAssociatedGroups',
            enforceVocabulary=True,
            write_permission=WriteRiskyConfig,
        ),
    ), )

    completeConfigSchema = baseSchema + specificSchema.copy()
    return completeConfigSchema
Exemplo n.º 12
0
def update_config_schema(baseSchema):

    specificSchema = Schema(
        (
            # field for defining title that will be used for item created in the Council
            DataGridField(
                # very strange bug when using a field name ending with 'References'...
                name='archivingRefs',
                widget=DataGridField._properties['widget'](
                    description="ArchivingRefs",
                    description_msgid="archiving_refs_descr",
                    columns={
                        'row_id':
                        Column("Archiving reference row id", visible=False),
                        'code':
                        Column("Archiving reference code"),
                        'label':
                        Column("Archiving reference label"),
                        'restrict_to_groups':
                        MultiSelectColumn(
                            "Archiving reference restrict to selected groups",
                            vocabulary="listActiveOrgsForArchivingRefs"),
                        'active':
                        SelectColumn("Archiving reference active?",
                                     vocabulary="listBooleanVocabulary",
                                     default='1'),
                    },
                    label='ArchivingRefs',
                    label_msgid='MeetingLiege_label_archivingRefs',
                    i18n_domain='PloneMeeting',
                    visible={
                        'view': 'invisible',
                    }),
                allow_oddeven=True,
                default=(),
                # do not use 'finance_advice' column for now, replaced (definitively?)
                # by field 'financeAdvice'
                columns=('row_id', 'code', 'label', 'restrict_to_groups',
                         'active'),
                allow_empty_rows=False,
                write_permission=WriteRiskyConfig,
            ), ), )

    completeConfigSchema = baseSchema + specificSchema.copy()
    return completeConfigSchema
Exemplo n.º 13
0
def update_config_schema(baseSchema):

    specificSchema = Schema((TextField(
        name='assemblyPolice',
        allowable_content_types=('text/plain', ),
        widget=TextAreaWidget(
            description="AssemblyPolice",
            description_msgid="assembly_police_descr",
            label='AssemblyPolice',
            label_msgid='PloneMeeting_label_assemblyPolice',
            i18n_domain='PloneMeeting',
        ),
        default_content_type='text/plain',
        schemata="assembly_and_signatures",
        write_permission="PloneMeeting: Write harmless config",
    ), ), )

    completeConfigSchema = baseSchema + specificSchema.copy()
    completeConfigSchema.moveField('assemblyPolice', after='assemblyStaves')
    return completeConfigSchema
Exemplo n.º 14
0
def update_muser_schema(baseSchema):
    specificSchema = Schema((
        DateTimeField(
            name='start_date_function',
            widget=DateTimeField._properties['widget'](
                label='start_date_function',
                label_msgid='MeetingAndenne_label_start_date_function',
                i18n_domain='PloneMeeting',
            ),
            searchable=True,
            required=False),
        DateTimeField(name='end_date_function',
                      widget=DateTimeField._properties['widget'](
                          label='end_date_function',
                          label_msgid='MeetingAndenne_label_end_date_function',
                          i18n_domain='PloneMeeting',
                      ),
                      searchable=True,
                      required=False),
    ), )

    completeUserSchema = baseSchema + specificSchema.copy()
    return completeUserSchema
Exemplo n.º 15
0
def update_meeting_schema(baseSchema):

    specificSchema = Schema((
        TextField(
            name='assemblyPolice',
            allowable_content_types="text/plain",
            optional=True,
            widget=TextAreaWidget(
                condition=
                "python: 'assemblyPolice' in here.shownAssemblyFields()",
                label='Assemblypolice',
                label_msgid='meeting_assemblyPolice',
                i18n_domain='PloneMeeting',
            ),
            default_output_type="text/html",
            default_method="getDefaultAssemblyPolice",
            default_content_type="text/plain",
        ),
        TextField(
            name='assemblyPrivacySecretAbsents',
            allowable_content_types="text/plain",
            optional=True,
            widget=TextAreaWidget(
                condition=
                "python: 'assemblyPrivacySecretAbsents' in here.shownAssemblyFields()",
                label='Assemblyprivacysecretabsents',
                label_msgid='PloneMeeting_label_assemblyPrivacySecretAbsents',
                i18n_domain='PloneMeeting',
            ),
            default_output_type="text/html",
            default_content_type="text/plain",
        ),
    ), )

    completeMeetingSchema = baseSchema + specificSchema.copy()
    return completeMeetingSchema
Exemplo n.º 16
0
                        u"Tags can be used to add arbitrary categorisation to "
                        u"issues. The list below shows existing tags which "
                        u"you can select, or you can add new ones."
                    ),
                ),
            ),
            searchable=True,
            vocabulary="getTagsVocab",
            enforceVocabulary=False,
            write_permission=permissions.ModifyIssueTags,
            accessor="Subject",
        ),
    )
)

PoiIssue_schema = BaseFolderSchema.copy() + schema.copy()
PoiIssue_schema.moveField("subject", after="watchers")


class PoiIssue(BaseFolder, BrowserDefaultMixin):
    """The default tracker
    """

    _at_rename_after_creation = True
    archetype_name = "Issue"
    implements(IIssue)
    meta_type = "PoiIssue"
    portal_type = "PoiIssue"
    schema = PoiIssue_schema
    security = ClassSecurityInfo()
Exemplo n.º 17
0
def update_item_schema(baseSchema):

    specificSchema = Schema(
        (
            # specific field for council added for MeetingManagers to transcribe interventions
            TextField(
                name='interventions',
                widget=RichWidget(
                    rows=15,
                    condition=
                    "python: here.portal_type in ('MeetingItemCouncil', 'MeetingItemZCouncil') \
                and (here.portal_plonemeeting.isManager(here) or here.portal_plonemeeting.userIsAmong('powerobservers')\
                or here.portal_plonemeeting.userIsAmong('restrictedpowerobservers'))",
                    label='Interventions',
                    label_msgid='MeetingSeraing_label_interventions',
                    description='Transcription of interventions',
                    description_msgid='MeetingSeraing_descr_interventions',
                    i18n_domain='PloneMeeting',
                ),
                default_content_type="text/html",
                searchable=True,
                allowable_content_types=('text/html', ),
                default_output_type="text/html",
                optional=True,
            ),
            # specific field for mark if this item must be printing in meeting
            BooleanField(
                name='isToPrintInMeeting',
                default=False,
                widget=BooleanField._properties['widget'](
                    description="IsToPrintInMeeting",
                    description_msgid="item_print_in_meeting_descr",
                    label='IsToPrintInMeeting',
                    label_msgid='PloneMeeting_label_item_print_in_meeting',
                    i18n_domain='PloneMeeting',
                ),
            ),
            # specific field for mark pv note
            TextField(
                name='pvNote',
                widget=RichWidget(
                    rows=15,
                    label='PvNote',
                    label_msgid='MeetingSeraing_label_pvNote',
                    description='PV Note',
                    description_msgid='MeetingSeraing_descr_pvNote',
                    i18n_domain='PloneMeeting',
                ),
                default_content_type="text/html",
                default="",
                searchable=True,
                allowable_content_types=('text/html', ),
                default_output_type="text/html",
                write_permission=
                "PloneMeeting: Write item MeetingManager reserved fields",
                read_permission="PloneMeeting: Read item observations",
                optional=True,
            ),
            # specific field for mark dg note
            TextField(
                name='dgNote',
                widget=RichWidget(
                    rows=15,
                    condition=
                    "python: here.portal_plonemeeting.isManager(here)",
                    label='dgnote',
                    label_msgid='MeetingSeraing_label_dgnote',
                    description='DG Note',
                    description_msgid='MeetingSeraing_descr_dgnote',
                    i18n_domain='PloneMeeting',
                ),
                default_content_type="text/html",
                default="",
                searchable=True,
                allowable_content_types=('text/html', ),
                default_output_type="text/html",
                optional=True,
            ),
        ), )

    baseSchema[
        'motivation'].widget.description_msgid = "MeetingSeraing_descr_motivation"

    completeItemSchema = baseSchema + specificSchema.copy()
    return completeItemSchema
Exemplo n.º 18
0
                description="Select the responsible manager for this issue",
                format="flex",
                label_msgid="Poi_label_newResponsibleManager",
                description_msgid="Poi_help_newResponsibleManager",
                i18n_domain="Poi",
            ),
            vocabulary="getManagersVocab",
            default_method="getCurrentResponsibleManager",
            enforceVocabulary=True,
            accessor="getNewResponsibleManager",
            write_permission=permissions.ModifyIssueAssignment,
        ),
    )
)

PoiResponse_schema = BaseSchema.copy() + schema.copy()


class PoiResponse(BaseContent, BrowserDefaultMixin):
    """A response to an issue, added by a project manager. When giving
    a response, the workflow state of the parent issue can be set at
    the same time.
    """

    security = ClassSecurityInfo()
    __implements__ = (
        (getattr(BaseContent, "__implements__", ()),)
        + (getattr(BrowserDefaultMixin, "__implements__", ()),)
        + (Response,)
    )
    implements(IResponse)
Exemplo n.º 19
0
                       description=_("Specify data source link"),
                       i18n_domain="eea",
                       helper_js=('++resource++eea.daviz.datasource.js', ),
                       helper_css=('++resource++eea.daviz.datasource.css', ))),
    DavizDataField('dataOwner',
                   alias="owner",
                   schemata='default',
                   vocabulary_factory=OrganisationsVocabulary,
                   widget=OrganisationsWidget(
                       label=_("Data source Organisation"),
                       description=_("Specify data source Organisation"),
                       i18n_domain="eea",
                   )),
))

DAVIZ_SCHEMA = ATFolder.schema.copy() + SCHEMA.copy()


def finalizeSchema(schema=DAVIZ_SCHEMA):
    """ Reorder and update schemata
    """
    # Move all fields to Metadata schemata
    for field in schema.fields():
        # Leave this fields in their original schemata
        if field.schemata == 'data input':
            continue

        # We use schema extender for this fields, so leave them in
        # categorization tab
        if field.getName() in ('subject', 'location', 'themes'):
            field.schemata = 'categorization'
Exemplo n.º 20
0
def update_item_schema(baseSchema):

    specificSchema = Schema(
        (
            # field for defining label that will be used when the item is in the Council
            # in College, this is a proposal that will be copied to the item sent to Council
            TextField(
                name='otherMeetingConfigsClonableToFieldLabelForCouncil',
                widget=RichWidget(
                    condition=
                    "python: here.attribute_is_used('otherMeetingConfigsClonableToFieldLabelForCouncil')",
                    label_msgid="MeetingLiege_label_labelForCouncil",
                    label='Description',
                    description="",
                    description_msgid="MeetingLiege_descr_labelForCouncil",
                    i18n_domain='PloneMeeting',
                ),
                default_content_type="text/html",
                searchable=True,
                allowable_content_types=('text/html', ),
                default_output_type="text/x-html-safe",
                optional=True,
            ),
            TextField(
                name='labelForCouncil',
                widget=RichWidget(
                    condition=
                    "python: here.attribute_is_used('labelForCouncil')",
                    label='LabelForCouncil',
                    label_msgid='MeetingLiege_label_labelForCouncil',
                    description="",
                    description_msgid="MeetingLiege_descr_labelForCouncil",
                    i18n_domain='PloneMeeting',
                ),
                default_content_type="text/html",
                searchable=True,
                allowable_content_types=('text/html', ),
                default_output_type="text/x-html-safe",
                optional=True,
            ),
            StringField(
                name='financeAdvice',
                widget=SelectionWidget(
                    condition="python: here.attribute_is_used('financeAdvice')",
                    description=
                    "If necessary, select the financial service that will have to "
                    "give the legal financial advice on this item",
                    description_msgid="MeetingLiege_descr_financeAdvice",
                    label='FinanceAdvice',
                    label_msgid='MeetingLiege_label_financeAdvice',
                    i18n_domain='PloneMeeting',
                ),
                optional=True,
                vocabulary='listFinanceAdvices',
                default='_none_',
            ),
            StringField(
                name='archivingRef',
                widget=SelectionWidget(
                    condition="python: here.attribute_is_used('archivingRef')",
                    label='ArchivingRef',
                    label_msgid='MeetingLiege_label_archivingRef',
                    description=" ",
                    description_msgid="MeetingLiege_descr_archivingRef",
                    i18n_domain='PloneMeeting',
                ),
                optional=True,
                vocabulary='listArchivingRefs',
                default='_none_',
            ),
        ), )

    completeItemSchema = baseSchema + specificSchema.copy()
    # define some description_msgid not existing by default in PloneMeeting
    completeItemSchema['title'].widget.description_msgid = 'item_title_descr'
    completeItemSchema[
        'description'].widget.description_msgid = 'item_description_descr'
    completeItemSchema[
        'detailedDescription'].widget.description_msgid = 'item_detailed_description_descr'
    completeItemSchema[
        'proposingGroup'].widget.description_msgid = 'item_proposing_group_descr'
    completeItemSchema[
        'motivation'].widget.description_msgid = 'item_motivation_descr'
    completeItemSchema[
        'decision'].widget.description_msgid = 'item_decision_descr'
    completeItemSchema[
        'decisionSuite'].widget.description_msgid = 'item_decision_suite_descr'
    completeItemSchema[
        'decisionEnd'].widget.description_msgid = 'item_decision_end_descr'
    completeItemSchema[
        'observations'].widget.description_msgid = 'item_observations_descr'
    # use a specific condition to show field 'otherMeetingConfigsClonableToEmergency'
    completeItemSchema['otherMeetingConfigsClonableToEmergency'].widget.condition = \
        'python: here.adapted().showOtherMeetingConfigsClonableToEmergency()'

    return completeItemSchema
                 ),
    BooleanField(
        name='billableProject',
        default="True",
        widget=BooleanWidget(
            label='Billable',
            label_msgid='eXtremeManagement_label_billable',
            i18n_domain='eXtremeManagement')
    ),
), )


FolderSchema = OrderedBaseFolderSchema.copy()
FolderSchema['description'].isMetadata = False
FolderSchema['description'].schemata = 'default'
Project_schema = FolderSchema + DefaultSchema.copy()


class Project(OrderedBaseFolder):
    """
    """
    security = ClassSecurityInfo()
    implements(IXMProject)

    # This name appears in the 'add' box
    archetype_name = 'Project'
    portal_type = meta_type = 'Project'
    typeDescription = "Project"
    typeDescMsgId = 'description_edit_project'
    _at_rename_after_creation = True
    schema = Project_schema
Exemplo n.º 22
0
def update_item_schema(baseSchema):
    specificSchema = Schema(
        (
            StringField(
                name='grpBudgetInfos',
                widget=MultiSelectionWidget(
                    description="GrpBudgetInfos",
                    description_msgid="MeetingNamur_descr_grpBudgetInfos",
                    size=10,
                    label='GrpBudgetInfos',
                    label_msgid='MeetingNamur_label_grpBudgetInfos',
                    i18n_domain='PloneMeeting',
                ),
                vocabulary='listGrpBudgetInfosAdviser',
                multiValued=1,
                enforceVocabulary=False,
            ),

            # field used to define specific certified signatures for a MeetingItem
            TextField(
                name='itemCertifiedSignatures',
                widget=TextAreaWidget(
                    label='Signatures',
                    label_msgid='PloneMeeting_label_certifiedSignatures',
                    description=
                    'Leave empty to use the certified signatures defined on the meeting or MeetingGroup',
                    description_msgid='MeetingNamur_descr_certified_signatures',
                    i18n_domain='PloneMeeting',
                ),
                write_permission='MeetingNamur: Write certified signatures',
                allowable_content_types=('text/plain', ),
                default_output_type='text/plain',
                default_content_type='text/plain',
            ),

            # field use to specify if this item is privacy (in this case, it's not visible in public pv)
            BooleanField(
                name='isConfidentialItem',
                default=False,
                widget=BooleanField._properties['widget'](
                    condition=
                    "python: here.portal_plonemeeting.isManager(here)",
                    label='IsConfidentialItem',
                    label_msgid='MeetingNamur_isConfidentialItem',
                    i18n_domain='PloneMeeting',
                ),
                optional=True,
            ),
            TextField(
                name='vote',
                widget=RichWidget(
                    condition="python: here.attributeIsUsed('vote')",
                    description="Vote",
                    description_msgid="item_vote_descr",
                    label='Vote',
                    label_msgid='MeetingNamur_vote',
                    i18n_domain='PloneMeeting',
                ),
                optional=True,
                write_permission=
                "PloneMeeting: Write item MeetingManager reserved fields",
                default_content_type="text/html",
                allowable_content_types=('text/html', ),
                default_output_type="text/x-html-safe",
            ),
        ), )

    baseSchema[
        'description'].write_permission = "MeetingNamur: Write description"
    baseSchema['description'].widget.label = "projectOfDecision"
    baseSchema['description'].widget.label_msgid = "projectOfDecision_label"

    completeSchema = baseSchema + specificSchema.copy()
    return completeSchema
Exemplo n.º 23
0
def update_meeting_schema(baseSchema):
    specificSchema = Schema((
        TextField(
            name='preMeetingAssembly',
            allowable_content_types="text/plain",
            optional=True,
            widget=TextAreaWidget(
                condition="python: here.attributeIsUsed('preMeetingAssembly')",
                description="PreMeetingAssembly",
                description_msgid="premeeting_assembly_descr",
                label='Premeetingassembly',
                label_msgid='MeetingLalouviere_label_preMeetingAssembly',
                i18n_domain='PloneMeeting',
            ),
            default_output_type="text/html",
            default_method="getDefaultPreMeetingAssembly",
            default_content_type="text/plain",
        ),
        DateTimeField(
            name='preMeetingDate_2',
            widget=DateTimeField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingDate_2')",
                label='Premeetingdate_2',
                label_msgid='PloneMeeting_label_preMeetingDate_2',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        StringField(
            name='preMeetingPlace_2',
            widget=StringField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingPlace_2')",
                label='Premeetingplace_2',
                label_msgid='PloneMeeting_label_preMeetingPlace_2',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        TextField(
            name='preMeetingAssembly_2',
            allowable_content_types="text/plain",
            optional=True,
            widget=TextAreaWidget(
                condition=
                "python: here.attributeIsUsed('preMeetingAssembly_2')",
                description="PreMeetingAssembly_2",
                description_msgid="premeeting_assembly_2_descr",
                label='Premeetingassembly_2',
                label_msgid='MeetingLalouviere_label_preMeetingAssembly_2',
                i18n_domain='PloneMeeting',
            ),
            default_output_type="text/html",
            default_method="getDefaultPreMeetingAssembly_2",
            default_content_type="text/plain",
        ),
        DateTimeField(
            name='preMeetingDate_3',
            widget=DateTimeField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingDate_3')",
                label='Premeetingdate_3',
                label_msgid='PloneMeeting_label_preMeetingDate_3',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        StringField(
            name='preMeetingPlace_3',
            widget=StringField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingPlace_3')",
                label='Premeetingplace_3',
                label_msgid='PloneMeeting_label_preMeetingPlace_3',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        TextField(
            name='preMeetingAssembly_3',
            allowable_content_types="text/plain",
            optional=True,
            widget=TextAreaWidget(
                condition=
                "python: here.attributeIsUsed('preMeetingAssembly_3')",
                description="PreMeetingAssembly_3",
                description_msgid="premeeting_assembly_3_descr",
                label='Premeetingassembly_3',
                label_msgid='MeetingLalouviere_label_preMeetingAssembly_3',
                i18n_domain='PloneMeeting',
            ),
            default_output_type="text/html",
            default_method="getDefaultPreMeetingAssembly_3",
            default_content_type="text/plain",
        ),
        DateTimeField(
            name='preMeetingDate_4',
            widget=DateTimeField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingDate_4')",
                label='Premeetingdate_4',
                label_msgid='PloneMeeting_label_preMeetingDate_4',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        StringField(
            name='preMeetingPlace_4',
            widget=StringField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingPlace_4')",
                label='Premeetingplace_4',
                label_msgid='PloneMeeting_label_preMeetingPlace_4',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        TextField(
            name='preMeetingAssembly_4',
            allowable_content_types="text/plain",
            optional=True,
            widget=TextAreaWidget(
                condition=
                "python: here.attributeIsUsed('preMeetingAssembly_4')",
                description="PreMeetingAssembly_4",
                description_msgid="premeeting_assembly_4_descr",
                label='Premeetingassembly_4',
                label_msgid='MeetingLalouviere_label_preMeetingAssembly_4',
                i18n_domain='PloneMeeting',
            ),
            default_output_type="text/html",
            default_method="getDefaultPreMeetingAssembly_4",
            default_content_type="text/plain",
        ),
        DateTimeField(
            name='preMeetingDate_5',
            widget=DateTimeField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingDate_5')",
                label='Premeetingdate_5',
                label_msgid='PloneMeeting_label_preMeetingDate_5',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        StringField(
            name='preMeetingPlace_5',
            widget=StringField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingPlace_5')",
                label='Premeetingplace_5',
                label_msgid='PloneMeeting_label_preMeetingPlace_5',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        TextField(
            name='preMeetingAssembly_5',
            allowable_content_types="text/plain",
            optional=True,
            widget=TextAreaWidget(
                condition=
                "python: here.attributeIsUsed('preMeetingAssembly_5')",
                description="PreMeetingAssembly_5",
                description_msgid="premeeting_assembly_5_descr",
                label='Premeetingassembly_5',
                label_msgid='MeetingLalouviere_label_preMeetingAssembly_5',
                i18n_domain='PloneMeeting',
            ),
            default_output_type="text/html",
            default_method="getDefaultPreMeetingAssembly_5",
            default_content_type="text/plain",
        ),
        DateTimeField(
            name='preMeetingDate_6',
            widget=DateTimeField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingDate_6')",
                label='Premeetingdate_6',
                label_msgid='PloneMeeting_label_preMeetingDate_6',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        StringField(
            name='preMeetingPlace_6',
            widget=StringField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingPlace_6')",
                label='Premeetingplace_6',
                label_msgid='PloneMeeting_label_preMeetingPlace_6',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        TextField(
            name='preMeetingAssembly_6',
            allowable_content_types="text/plain",
            optional=True,
            widget=TextAreaWidget(
                condition=
                "python: here.attributeIsUsed('preMeetingAssembly_6')",
                description="PreMeetingAssembly_6",
                description_msgid="premeeting_assembly_6_descr",
                label='Premeetingassembly_6',
                label_msgid='MeetingLalouviere_label_preMeetingAssembly_6',
                i18n_domain='PloneMeeting',
            ),
            default_output_type="text/html",
            default_method="getDefaultPreMeetingAssembly_6",
            default_content_type="text/plain",
        ),
        DateTimeField(
            name='preMeetingDate_7',
            widget=DateTimeField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingDate_7')",
                label='Premeetingdate_7',
                label_msgid='PloneMeeting_label_preMeetingDate_7',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        StringField(
            name='preMeetingPlace_7',
            widget=StringField._properties['widget'](
                condition="python: here.attributeIsUsed('preMeetingPlace_7')",
                label='Premeetingplace_7',
                label_msgid='PloneMeeting_label_preMeetingPlace_7',
                i18n_domain='PloneMeeting',
            ),
            optional=True,
        ),
        TextField(
            name='preMeetingAssembly_7',
            allowable_content_types="text/plain",
            optional=True,
            widget=TextAreaWidget(
                condition=
                "python: here.attributeIsUsed('preMeetingAssembly_7')",
                description="PreMeetingAssembly_7",
                description_msgid="premeeting_assembly_7_descr",
                label='Premeetingassembly_7',
                label_msgid='MeetingLalouviere_label_preMeetingAssembly_7',
                i18n_domain='PloneMeeting',
            ),
            default_output_type="text/html",
            default_method="getDefaultPreMeetingAssembly_7",
            default_content_type="text/plain",
        ),
    ), )

    baseSchema['observations'].widget.label_method = "getLabelObservations"

    completeMeetingSchema = baseSchema + specificSchema.copy()
    return completeMeetingSchema
Exemplo n.º 24
0
        widget=StringWidget(
            label="Short name",
            description=("Short name for the tracker - should be 'issues' "
                         "to comply with the standards."),
            label_msgid="Poi_label_psctracker_title",
            description_msgid="Poi_description_psctracker_title",
            i18n_domain='Poi',
        ),
        required=False,
        mode="r"
    ),

),
)

PoiPscTracker_schema = PoiTracker_schema.copy() + schema.copy()
PoiPscTracker_schema['title'].required = False
PoiPscTracker_schema['title'].widget.visible = {'edit': 'invisible',
                                                'view': 'visible'}
del PoiPscTracker_schema['availableReleases']


class PoiPscTracker(PoiTracker):
    """Version of the PoiTracker which supports the
    PloneSoftwareCenter. Intended to be added inside a PSCProject.
    """
    _at_rename_after_creation = True
    archetype_name = 'Issue Tracker'
    implements(ITracker)
    meta_type = 'PoiPscTracker'
    portal_type = 'PoiPscTracker'
Exemplo n.º 25
0
        keepReferencesOnCopy=True,
        accessor="get_related_items",
        edit_accessor="get_raw_related_items",
        mutator="set_related_items",
        widget=EEAReferenceBrowserWidget(
            label="Answers to policy question and related EEAFigures",
            description='Answers to policy question and related EEAFigures',
            label_msgid='indicators_label_question_answered',
            i18n_domain='indicators',
            macro="assessmentpart_relationwidget",
        )
    ),
))

AssessmentPart_schema = ATFolderSchema.copy() + \
    getattr(ATCTContent, 'schema', Schema(())).copy() + schema.copy()

AssessmentPart_schema.moveField('relatedItems', pos=0)
finalizeATCTSchema(AssessmentPart_schema)


class AssessmentPart(ATFolder, ModalFieldEditableAware,
                     CustomizedObjectFactory, ATCTContent,
                     BrowserDefaultMixin):
    """Assessment part
    """
    security = ClassSecurityInfo()

    implements(interfaces.IAssessmentPart)

    meta_type = 'AssessmentPart'
Exemplo n.º 26
0
            visible=-1,
            description=("Short ID description."),
            label_msgid='dataservice_label_shortid',
            description_msgid='dataservice_help_shortid',
            i18n_domain='eea',
        )
    ),

    # Fields for 'relations' schemata
    LinesField(
        schemata="categorization",
        name='externalRelations',
        languageIndependent=True,
        widget=LinesWidget(
            label="External links, non EEA websites",
            description=("External links, non EEA websites. "
                         "Please write http:// in front of the links."),
            label_msgid='dataservice_label_external',
            description_msgid='dataservice_help_external',
            i18n_domain='eea',
        )
    ),
),)

dataservice_schema = ATFolderSchema.copy() + \
                     getattr(ThemeTaggable, 'schema', Schema(())).copy() + \
                     dataservice_base_schema.copy()

dataservice_schema['description'].widget.rows = 15
dataservice_schema['description'].required = True
Exemplo n.º 27
0
                validators=('isEmail', )),
    ReferenceField(name='enquiryRequestor',
                   widget=ReferenceWidget(
                       label='Enquiryrequestor',
                       label_msgid='EEAEnquiry_label_enquiryRequestor',
                       i18n_domain='EEAEnquiry',
                   ),
                   allowed_types=('EnquiryRequestor', ),
                   multiValued=0,
                   relationship='enquriyRequestor'),
), )

schema['enquiryRequestor'].widget.visible = {'edit': 'invisible'}

Enquiry_schema = BaseSchema.copy() + \
    schema.copy()


class Enquiry(BaseContent):
    """ Enquiry
    """
    security = ClassSecurityInfo()
    __implements__ = (getattr(BaseContent, '__implements__', ()), )

    # This name appears in the 'add' box
    archetype_name = 'Enquiry'

    meta_type = 'Enquiry'
    portal_type = 'Enquiry'
    allowed_content_types = []
    filter_content_types = 0
""" Requestor folder
"""
from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import registerType, Schema
from Products.ATContentTypes.content.folder import ATBTreeFolder
from Products.EEAEnquiry.config import PROJECTNAME
from Products.CMFCore.permissions import ModifyPortalContent

schema = Schema((

),
)

EnquiryRequestorFolder_schema = getattr(
    ATBTreeFolder, 'schema', Schema(())).copy() + schema.copy()

class EnquiryRequestorFolder(ATBTreeFolder):
    """ Enquiry Requestor Folder
    """
    security = ClassSecurityInfo()

    # This name appears in the 'add' box
    archetype_name = 'EnquiryRequestorFolder'
    meta_type = 'EnquiryRequestorFolder'
    portal_type = 'EnquiryRequestorFolder'
    allowed_content_types = ['EnquiryRequestor'] + list(
        getattr(ATBTreeFolder, 'allowed_content_types', []))
    filter_content_types = 1
    global_allow = 0
    immediate_view = 'base_view'
    default_view = 'base_view'
Exemplo n.º 29
0
        'projectedAssignments',
        searchable=False,
        required=True,
        default=0,
        validators=('isInt', validators.POSITIVE_NUMBER_VALIDATOR_NAME),
        widget=IntegerWidget(
            label="Projected Number of Assignments",
            label_msgid="label_projected_assignments",
            description="Projected number of assignments, 0 means undefined",
            description_msgid="help_projected_assignments",
            i18n_domain=config.I18N_DOMAIN,
        ),
    ),
), )

ECFolder_schema = ATFolderSchema.copy() + schema.copy()


class ECFolder(ATFolder):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IECFolder)

    meta_type = 'ECFolder'
    _at_rename_after_creation = True

    schema = ECFolder_schema

    # Methods
Exemplo n.º 30
0
        )
    ),
    DavizDataField('dataOwner', alias="owner",
        schemata='default',
        vocabulary_factory=OrganisationsVocabulary,
        widget=OrganisationsWidget(
            label=_("Data source Organisation"),
            description=_("Specify data source Organisation"),
            i18n_domain="eea",
            visible={'edit': 'invisible', 'view': 'invisible'}
        )
    ),

))

DAVIZ_SCHEMA = ATFolder.schema.copy() + SCHEMA.copy()

def finalizeSchema(schema=DAVIZ_SCHEMA):
    """ Reorder and update schemata
    """
    # Move all fields to Metadata schemata
    for field in schema.fields():
        # Leave this fields in their original schemata
        if field.schemata == 'data input':
            continue

        # We use schema extender for this fields, so leave them in
        # categorization tab
        if field.getName() in ('subject', 'location', 'themes'):
            field.schemata = 'categorization'
            continue
                   'mini': (200, 200),
                   'thumb': (128, 128),
                   'tile': (64, 64),
                   'icon': (32, 32),
                   'listing': (16, 16),
                  },
    ),
),
)

OrderedClassifiedsCategory_schema = document.ATDocumentSchema.copy()
OrderedClassifiedsCategory_schema += ConstrainTypesMixinSchema
OrderedClassifiedsCategory_schema += schemata.NextPreviousAwareSchema
OrderedClassifiedsCategory_schema += atapi.Schema((

)) + schema.copy()


schemata.finalizeATCTSchema(OrderedClassifiedsCategory_schema,
                            folderish=True,
                            moveDiscussion=False)


class OrderedClassifiedsCategory(folder.ATFolder):
    """
        Category which can contain Classifieds (such as books),
        Ordered version
    """
    security = ClassSecurityInfo()

    implements(interfaces.IOrderedClassifiedsCategory)
Exemplo n.º 32
0
            label_msgid='dataservice_label_url',
            description_msgid='dataservice_help_url',
            i18n_domain='eea',
        )),
    TextField(name='data_policy',
              searchable=True,
              widget=TextAreaWidget(
                  label="Data policy",
                  description="Data policy description.",
                  label_msgid='dataservice_label_policy',
                  description_msgid='dataservice_help_policy',
                  i18n_domain='eea',
              )),
), )

Organisation_schema = ATFolderSchema.copy() + schema.copy()


class Organisation(ATFolder):
    """ Organisation Content Type
    """
    implements(IOrganisation)
    security = ClassSecurityInfo()

    archetype_name = 'Organisation'
    portal_type = 'Organisation'
    meta_type = 'Organisation'
    _at_rename_after_creation = True

    schema = Organisation_schema
Exemplo n.º 33
0
                label_msgid='dataservice_label_category',
                description_msgid='dataservice_help_category',
                i18n_domain='eea',
            )),
        StringField(name='shortId',
                    widget=StringWidget(
                        label="Short ID",
                        visible=-1,
                        description="Short ID description.",
                        label_msgid='dataservice_label_shortid',
                        description_msgid='dataservice_help_shortid',
                        i18n_domain='eea',
                    )),
    ), )

eeafigurefile_schema = ATFolderSchema.copy() + schema.copy()


class EEAFigureFile(ATFolder):
    """ EEAFigureFile Content Type
    """
    implements(IEEAFigureFile, IFileContent)
    archetype_name = portal_type = meta_type = 'EEAFigureFile'
    allowed_content_types = [
        'ATImage', 'File', 'Folder', 'DataFile', 'DataTable'
    ]
    _at_rename_after_creation = True
    schema = eeafigurefile_schema

    security = ClassSecurityInfo()
Exemplo n.º 34
0
def update_item_schema(baseSchema):
    specificSchema = Schema((
        StringField(
            name='refdoc',
            default_method="getDocReference",
            widget=StringWidget(
                size=100,
                label='Refdoc',
                label_msgid='MeetingAndenne_label_refDoc',
                i18n_domain='PloneMeeting',
            ),
            searchable=True,
        ),
        StringField(
            name='verifUser',
            default_method="Creator",
            widget=StringWidget(
                visible=False,
                format="select",
                label='Verifuser',
                label_msgid='MeetingAndenne_label_verifUser',
                i18n_domain='PloneMeeting',
            ),
            searchable=True,
        ),
        StringField(name='yourrefdoc',
                    widget=StringWidget(
                        size=100,
                        label='yourRefdoc',
                        label_msgid='MeetingAndenne_label_yourrefDoc',
                        i18n_domain='PloneMeeting',
                    ),
                    searchable=True),
        StringField(
            name='treatUser',
            default_method="Creator",
            widget=SelectionWidget(
                format="select",
                label='Treatuser',
                label_msgid='MeetingAndenne_label_treatUser',
                i18n_domain='PloneMeeting',
            ),
            vocabulary='listTreatUsers',
            searchable=True,
        ),
        TextField(name='projetpv',
                  widget=RichWidget(
                      rows=15,
                      label='Projetpv',
                      label_msgid='MeetingAndenne_label_projetpv',
                      i18n_domain='PloneMeeting',
                  ),
                  read_permission="PloneMeeting: Read decision",
                  default_content_type="text/html",
                  searchable=True,
                  write_permission="PloneMeeting: Write decision",
                  allowable_content_types=('text/html', ),
                  default_output_type="text/html"),
        TextField(name='pv',
                  widget=RichWidget(
                      rows=15,
                      label='Pv',
                      label_msgid='MeetingAndenne_label_pv',
                      i18n_domain='PloneMeeting',
                  ),
                  read_permission="MeetingAndenne: Read pv",
                  default_content_type="text/html",
                  searchable=True,
                  write_permission="MeetingAndenne: Write pv",
                  allowable_content_types=('text/html', ),
                  default_output_type="text/html"),
        TextField(name='textpv',
                  widget=RichWidget(
                      rows=15,
                      label='Textpv',
                      label_msgid='MeetingAndenne_label_textpv',
                      i18n_domain='PloneMeeting',
                  ),
                  read_permission="MeetingAndenne: Read pv",
                  default_content_type="text/html",
                  searchable=True,
                  write_permission="MeetingAndenne: Write pv",
                  allowable_content_types=('text/html', ),
                  default_output_type="text/html"),
        BooleanField(name='isconfidential',
                     widget=BooleanWidget(
                         label='IsConfidential',
                         label_msgid='MeetingAndenne_label_isConfidential',
                         i18n_domain='PloneMeeting',
                     ),
                     searchable=True,
                     default=False),
        LinesField(
            name='itemPresents',
            widget=MultiSelectionWidget(
                visible=False,
                format="checkbox",
                label='Itempresents',
                label_msgid='MeetingAndenne_label_itemPresents',
                i18n_domain='PloneMeeting',
            ),
            multiValued=1,
        ),
    ), )

    completeItemSchema = baseSchema + specificSchema.copy()
    completeItemSchema[
        'title'].widget.condition = "python: not hasattr(here, 'template') or not here.queryState()=='itemcreated' or here.portal_membership.getAuthenticatedMember().has_role('Manager')"

    completeItemSchema[
        'copyGroups'].write_permission = "MeetingAndenne: Write copygroup"
    completeItemSchema[
        'description'].widget.label_method = 'getLabelForDescription'
    completeItemSchema['budgetInfos'].widget.rows = 12
    completeItemSchema['itemSignatories'].optional = True
    completeItemSchema[
        'proposingGroup'].default_method = "getDefaultProposingGroup"
    completeItemSchema[
        'notes'].read_permission = "PloneMeeting: Read item observations"
    completeItemSchema[
        'notes'].write_permission = "PloneMeeting: Write item observations"
    completeItemSchema['votesAreSecret'].default = True

    completeItemSchema['category'].widget = DynatreeWidget(
        condition="python: here.showCategory()",
        description="Category",
        description_msgid="item_category_descr",
        label='Category',
        label_msgid='PloneMeeting_label_category',
        i18n_domain='PloneMeeting',
        leafsOnly=True,
        rootVisible=True,
        selectMode=1,
        sparse=False,
    )
    completeItemSchema['category'].vocabulary = SubCategoriesVocabulary()

    completeItemSchema.moveField('refdoc', pos='top')
    completeItemSchema.moveField('yourrefdoc', pos=2)
    completeItemSchema.moveField('treatUser', pos=8)
    completeItemSchema.moveField('projetpv', pos=25)
    completeItemSchema.moveField('pv', pos=25)
    completeItemSchema.moveField('textpv', pos=24)
    completeItemSchema.moveField('isconfidential', pos='top')

    return completeItemSchema
Exemplo n.º 35
0
def update_config_schema(baseSchema):
    specificSchema = Schema((
        TextField(
            name='preMeetingAssembly_default',
            widget=TextAreaWidget(
                condition=
                "python: 'preMeetingAssembly' in here.getUsedMeetingAttributes()",
                description="PreMeetingAssembly",
                description_msgid="premeeting_assembly_descr",
                label='Premeetingassembly',
                label_msgid=
                'MeetingLalouviere_label_preMeetingAssembly_default',
                i18n_domain='PloneMeeting',
                label_method='getLabelPreMeetingAssembly_default'),
        ),
        TextField(
            name='preMeetingAssembly_2_default',
            widget=TextAreaWidget(
                condition=
                "python: 'preMeetingAssembly_2' in here.getUsedMeetingAttributes()",
                description="PreMeetingAssembly_2",
                description_msgid="premeeting_assembly_2_descr",
                label='Premeetingassembly_2',
                label_msgid=
                'MeetingLalouviere_label_preMeetingAssembly_2_default',
                i18n_domain='PloneMeeting',
            ),
        ),
        TextField(
            name='preMeetingAssembly_3_default',
            widget=TextAreaWidget(
                condition=
                "python: 'preMeetingAssembly_3' in here.getUsedMeetingAttributes()",
                description="PreMeetingAssembly_3",
                description_msgid="premeeting_assembly_3_descr",
                label='Premeetingassembly_3',
                label_msgid=
                'MeetingLalouviere_label_preMeetingAssembly_3_default',
                i18n_domain='PloneMeeting',
            ),
        ),
        TextField(
            name='preMeetingAssembly_4_default',
            widget=TextAreaWidget(
                condition=
                "python: 'preMeetingAssembly_4' in here.getUsedMeetingAttributes()",
                description="PreMeetingAssembly_4",
                description_msgid="premeeting_assembly_4_descr",
                label='Premeetingassembly_4',
                label_msgid=
                'MeetingLalouviere_label_preMeetingAssembly_4_default',
                i18n_domain='PloneMeeting',
            ),
        ),
        TextField(
            name='preMeetingAssembly_5_default',
            widget=TextAreaWidget(
                condition=
                "python: 'preMeetingAssembly_5' in here.getUsedMeetingAttributes()",
                description="PreMeetingAssembly_5",
                description_msgid="premeeting_assembly_5_descr",
                label='Premeetingassembly_5',
                label_msgid=
                'MeetingLalouviere_label_preMeetingAssembly_5_default',
                i18n_domain='PloneMeeting',
            ),
        ),
        TextField(
            name='preMeetingAssembly_6_default',
            widget=TextAreaWidget(
                condition=
                "python: 'preMeetingAssembly_6' in here.getUsedMeetingAttributes()",
                description="PreMeetingAssembly_6",
                description_msgid="premeeting_assembly_6_descr",
                label='Premeetingassembly_6',
                label_msgid=
                'MeetingLalouviere_label_preMeetingAssembly_6_default',
                i18n_domain='PloneMeeting',
            ),
        ),
        TextField(
            name='preMeetingAssembly_7_default',
            widget=TextAreaWidget(
                condition=
                "python: 'preMeetingAssembly_7' in here.getUsedMeetingAttributes()",
                description="PreMeetingAssembly_7",
                description_msgid="premeeting_assembly_7_descr",
                label='Premeetingassembly_7',
                label_msgid=
                'MeetingLalouviere_label_preMeetingAssembly_7_default',
                i18n_domain='PloneMeeting',
            ),
        ),
        BooleanField(
            name='initItemDecisionIfEmptyOnDecide',
            default=True,
            widget=BooleanField._properties['widget'](
                description="InitItemDecisionIfEmptyOnDecide",
                description_msgid="init_item_decision_if_empty_on_decide",
                label='Inititemdecisionifemptyondecide',
                label_msgid=
                'MeetingLaLouviere_label_initItemDecisionIfEmptyOnDecide',
                i18n_domain='PloneMeeting'),
            write_permission=WriteRiskyConfig,
        ),
    ), )

    completeConfigSchema = baseSchema + specificSchema.copy()
    return completeConfigSchema
Exemplo n.º 36
0
        required = True,
        default = 0,
        validators = ('isInt', validators.POSITIVE_NUMBER_VALIDATOR_NAME),
        widget = IntegerWidget(
            label = "Projected Number of Assignments",
            label_msgid = "label_projected_assignments",
            description = "Projected number of assignments, 0 means undefined",
            description_msgid = "help_projected_assignments",
            i18n_domain = config.I18N_DOMAIN,
        ),
    ),

),
)

ECFolder_schema = ATFolderSchema.copy() + schema.copy()

class ECFolder(ATFolder):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IECFolder)

    meta_type = 'ECFolder'
    _at_rename_after_creation = True

    schema = ECFolder_schema

    # Methods
    security.declarePrivate('getCompletedStatesVocab')
Exemplo n.º 37
0
def update_item_schema(baseSchema):

    specificSchema = Schema(
        (
            # specific field for council added for MeetingManagers to transcribe interventions
            TextField(
                name='interventions',
                widget=RichWidget(
                    rows=15,
                    condition=
                    "python: here.portal_type == 'MeetingItemCouncil' and here.portal_plonemeeting.isManager(here)",
                    label='Interventions',
                    label_msgid='MeetingLalouviere_label_interventions',
                    description='Transcription of interventions',
                    description_msgid='MeetingLalouviere_descr_interventions',
                    i18n_domain='PloneMeeting',
                ),
                optional=True,
                default_content_type="text/html",
                searchable=True,
                allowable_content_types=('text/html', ),
                default_output_type="text/html",
            ),
            # specific field for council added for MeetingManagers to transcribe interventions
            TextField(
                name='commissionTranscript',
                widget=RichWidget(
                    rows=15,
                    condition=
                    "python: here.portal_type == 'MeetingItemCouncil' and "
                    "here.attributeIsUsed('commissionTranscript')",
                    label='CommissionTranscript',
                    label_msgid='MeetingLalouviere_label_commissionTranscript',
                    description='Transcription of commission',
                    description_msgid=
                    'MeetingLalouviere_descr_commissionTranscript',
                    i18n_domain='PloneMeeting',
                ),
                optional=True,
                default_content_type="text/html",
                default="<p>N&eacute;ant</p>",
                searchable=True,
                allowable_content_types=('text/html', ),
                default_output_type="text/html",
                write_permission=
                "MeetingLalouviere: Write commission transcript",
                read_permission="MeetingLalouviere: Read commission transcript",
            ),
            #here above are 3 specific fields for managing item follow-up
            StringField(
                name='followUp',
                default="follow_up_no",
                widget=SelectionWidget(
                    condition=
                    "python: here.attributeIsUsed('neededFollowUp') and here.adapted().showFollowUp()",
                    description="A follow up is needed : no, yes, provided?",
                    description_msgid="MeetingLalouviere_descr_followUp",
                    label='FollowUp',
                    label_msgid='MeetingLalouviere_label_followUp',
                    i18n_domain='PloneMeeting',
                ),
                vocabulary_factory=
                'Products.MeetingLalouviere.vocabularies.listFollowUps',
                write_permission="MeetingLalouviere: Write followUp",
                read_permission="MeetingLalouviere: Read followUp",
            ),
            TextField(
                name='neededFollowUp',
                optional=True,
                widget=RichWidget(
                    rows=15,
                    condition=
                    "python: here.attributeIsUsed('neededFollowUp') and here.adapted().showFollowUp()",
                    label='NeededFollowUp',
                    label_msgid='MeetingLalouviere_label_neededFollowUp',
                    description='Follow-up needed for this item',
                    description_msgid='MeetingLalouviere_descr_neededFollowUp',
                    i18n_domain='PloneMeeting',
                ),
                default_content_type="text/html",
                searchable=True,
                allowable_content_types=('text/html', ),
                default_output_type="text/html",
                write_permission="MeetingLalouviere: Write neededFollowUp",
                read_permission="MeetingLalouviere: Read neededFollowUp",
            ),
            TextField(
                name='providedFollowUp',
                optional=True,
                widget=RichWidget(
                    rows=15,
                    condition=
                    "python: here.attributeIsUsed('providedFollowUp') and here.adapted().showFollowUp()",
                    label='ProvidedFollowUp',
                    label_msgid='MeetingLalouviere_label_providedFollowUp',
                    description='Follow-up provided for this item',
                    description_msgid=
                    'MeetingLalouviere_descr_providedFollowUp',
                    i18n_domain='PloneMeeting',
                ),
                default_content_type="text/html",
                default="<p>N&eacute;ant</p>",
                searchable=True,
                allowable_content_types=('text/html', ),
                default_output_type="text/html",
                write_permission="MeetingLalouviere: Write providedFollowUp",
                read_permission="MeetingLalouviere: Read providedFollowUp",
            ),
        ), )

    # Don't forget the label override in skins/meetinglalouviere_templates/meetingitem_view.pt
    baseSchema['description'].widget.label_method = "getLabelDescription"

    baseSchema['privacy'].widget.condition = "python: here.attributeIsUsed('privacy') and " \
                                             "portal.portal_plonemeeting.isManager(here)"

    baseSchema['observations'].write_permission = ModifyPortalContent

    completeItemSchema = baseSchema + specificSchema.copy()
    return completeItemSchema
Exemplo n.º 38
0
            i18n_domain='gites',
        ),
        required=1,
        storage=AttributeStorage()
    ),

),
)

##code-section after-local-schema #fill in your manual code here
schema['photo'].sizes = {'large': (900, 421),
                         'thumb': (240, 156)}
##/code-section after-local-schema

BoutiqueItem_schema = BaseFolderSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
BoutiqueItem_schema = ATFolder.schema.copy() + \
    schema.copy()

##/code-section after-schema


class BoutiqueItem(ATFolder):
    """
    """
    implements(IBoutiqueItem)
    security = ClassSecurityInfo()
    __implements__ = (getattr(ATFolder, '__implements__', ()))
Exemplo n.º 39
0
        validators=('management_plan_code_validator', ),
        vocabulary_factory="Temporal coverage",
        storage=AnnotationStorage(migrate=True),
        widget=ManagementPlanWidget(
            format="select",
            label="EEA Management Plan",
            description=("EEA Management plan code."),
            label_msgid='dataservice_label_eea_mp',
            description_msgid='dataservice_help_eea_mp',
            i18n_domain='eea.dataservice',
        ),
    ),
), )

CloudVideo_schema = (getattr(ATFile, 'schema', Schema(
    ())).copy() + ThemeTaggable_schema.copy() + schema.copy())

# hide file field from CloudVideo
CloudVideo_schema['file'].required = False
CloudVideo_schema['file'].widget.visible = {
    "edit": "invisible",
    "view": "invisible"
}


class CloudVideo(ATFile, ThemeTaggable):
    """ CloudVideo contenttype
    """
    security = ClassSecurityInfo()
    implements(ICloudVideo)
Exemplo n.º 40
0
from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin
from Products.CMFCore.utils import UniqueObject
from Products.DCWorkflow.Transitions import TRIGGER_USER_ACTION

#from zLOG import LOG, INFO, ERROR
from Products.ECAssignmentBox.tool.Statistics import Statistics
from Products.ECAssignmentBox.tool.interfaces import IECABTool
from Products.ECAssignmentBox import config
from Products.ECAssignmentBox import LOG

schema = Schema((
),
)

ECABTool_schema = BaseSchema.copy() + schema.copy()

class ECABTool(UniqueObject, BaseContent, BrowserDefaultMixin):
    """
    """
    security = ClassSecurityInfo()
    implements(IECABTool)
    meta_type = 'ECABTool'
    plone_tool = True
    _at_rename_after_creation = True

    schema = ECABTool_schema

    def __init__(self, id=None):
        """
        Tool-constructors have no id argument, the id is fixed
Exemplo n.º 41
0
            label = "Body Text",
            label_msgid = "label_body_text",
            description = "Enter course information",
            description_msgid = "help_body_text",
            rows = 18,
            i18n_domain = config.I18N_DOMAIN,
            allow_file_upload = config.ALLOW_DOCUMENT_UPLOAD,

        )
    ),

),
)


ECLecture_schema = SuperSchema.copy() + schema.copy()

if 'directions' in ECLecture_schema:
    # hide directions field if inheriting from ECFolder
    ECLecture_schema['directions'].widget.visible = {'view' : 'invisible',
                                           'edit' : 'invisible' }
    # move inherited fields to separate edit page
    ECLecture_schema['completedStates'].schemata = 'more'
    ECLecture_schema['projectedAssignments'].schemata = 'more'


class ECLecture(SuperClass):
    """A folder which contains lecture information."""
    security = ClassSecurityInfo()

    implements(interfaces.IECLecture)