Exemplo n.º 1
0
    def translations(self):
        msg_confirm = _(u'note_text_confirm_abord', default=u'Confirm abbord')
        msg_title_info = ogbmf(u'message_title_info', default=u'Information')
        msg_title_error = ogbmf(u'message_title_error', default=u'Error')
        msg_body_info = _(u'message_body_info', default=u'Changes saved')
        msg_body_error = _(u'message_body_error', default=u'Changes not saved')
        create_translations = lambda msg: translate(msg, context=self.request)

        return json.dumps(
            {'note_text_confirm_abord': create_translations(msg_confirm),
             'message_title_info': create_translations(msg_title_info),
             'message_title_error': create_translations(msg_title_error),
             'message_body_info': create_translations(msg_body_info),
             'message_body_error': create_translations(msg_body_error)
             })
Exemplo n.º 2
0
    def get_metadata_config(self):
        rows = [
            FieldRow('title'),
            FieldRow('IDocumentMetadata.document_date'),
            FieldRow('IDocumentMetadata.document_type'),
            FieldRow('IDocumentMetadata.document_author'),
            CustomRow(self.render_creator_link,
                      label=ogdmf('label_creator', default='creator')),
            WebIntelligentFieldRow('IDocumentMetadata.description'),
            FieldRow('IDocumentMetadata.foreign_reference'),
            TemplateRow(self.file_template,
                        label=_('label_org_message', default='Message')),
            TemplateRow(self.attachments_template,
                        label=_('label_documents',
                                default='Attachments')),
            FieldRow('IDocumentMetadata.digitally_available'),
            FieldRow('IDocumentMetadata.preserved_as_paper'),
            FieldRow('IDocumentMetadata.receipt_date'),
            FieldRow('IDocumentMetadata.delivery_date'),
            FieldRow('IRelatedDocuments.relatedItems'),
            FieldRow('IClassification.classification'),
            FieldRow('IClassification.privacy_layer'),
            TemplateRow(self.public_trial_template,
                        label=ogbmf('label_public_trial',
                                    default='Public Trial')),
            FieldRow('IClassification.public_trial_statement'),
        ]

        if api.user.has_permission('cmf.ManagePortal'):
            rows.append(FieldRow('IOGMail.original_message'))
            rows.append(FieldRow('IOGMail.message_source'))

        return rows
Exemplo n.º 3
0
    def get_metadata_config(self):
        rows = [
            FieldRow('title'),
            FieldRow('IDocumentMetadata.document_date'),
            FieldRow('IDocumentMetadata.document_type'),
            FieldRow('IDocumentMetadata.document_author'),
            CustomRow(self.render_creator_link,
                      label=ogdmf('label_creator', default='creator')),
            FieldRow('IDocumentMetadata.description'),
            FieldRow('IDocumentMetadata.foreign_reference'),
            TemplateRow(self.file_template,
                        label=_('label_org_message',
                                default='Original message')),
            TemplateRow(self.attachments_template,
                        label=_('label_documents',
                                default='Attachments')),
            FieldRow('IDocumentMetadata.digitally_available'),
            FieldRow('IDocumentMetadata.preserved_as_paper'),
            FieldRow('IDocumentMetadata.receipt_date'),
            FieldRow('IDocumentMetadata.delivery_date'),
            FieldRow('IRelatedDocuments.relatedItems'),
            FieldRow('IClassification.classification'),
            FieldRow('IClassification.privacy_layer'),
            TemplateRow(self.public_trial_template,
                        label=ogbmf('label_public_trial',
                                    default='Public Trial')),
            FieldRow('IClassification.public_trial_statement'),
        ]

        if api.user.has_permission('cmf.ManagePortal'):
            rows.append(FieldRow('IOGMail.original_message'))
            rows.append(FieldRow('IOGMail.message_source'))

        return rows
Exemplo n.º 4
0
 def get_metadata_config(self):
     return [
         FieldRow('title'),
         FieldRow('IDocumentMetadata.document_date'),
         FieldRow('IDocumentMetadata.document_type'),
         FieldRow('IDocumentMetadata.document_author'),
         CustomRow(self.render_creator_link,
                   label=ogdmf('label_creator', default='creator')),
         FieldRow('IDocumentMetadata.description'),
         FieldRow('IDocumentMetadata.foreign_reference'),
         TemplateRow(self.file_template,
                     label=_('label_org_message',
                             default='Original message')),
         FieldRow('IDocumentMetadata.digitally_available'),
         FieldRow('IDocumentMetadata.preserved_as_paper'),
         FieldRow('IDocumentMetadata.receipt_date'),
         FieldRow('IDocumentMetadata.delivery_date'),
         FieldRow('IRelatedDocuments.relatedItems'),
         FieldRow('IClassification.classification'),
         FieldRow('IClassification.privacy_layer'),
         TemplateRow(self.public_trial_template,
                     label=ogbmf('label_public_trial',
                                 default='Public Trial')),
         FieldRow('IClassification.public_trial_statement'),
     ]
Exemplo n.º 5
0
    def get_metadata_config(self):
        rows = [
            FieldRow('title'),
            FieldRow('IDocumentMetadata.document_date'),
            TemplateRow(self.file_template,
                        label=_('label_file', default='File')),
            CustomRow(self.get_creation_date,
                      label=_('label_created', default='Created')),
            CustomRow(self.get_modification_date,
                      label=_('label_modified', default='Modified')),
            FieldRow('IDocumentMetadata.document_type'),
            FieldRow('IDocumentMetadata.document_author'),
            CustomRow(self.render_creator_link,
                      label=_('label_creator', default='creator')),
            WebIntelligentFieldRow('IDocumentMetadata.description'),
            TemplateRow(self.keywords_template,
                        label=_(u'label_keywords', default=u'Keywords')),
            FieldRow('IDocumentMetadata.foreign_reference'),
            CustomRow(self.render_checked_out_link,
                      label=_('label_checked_out', default='Checked out')),
            FieldRow('IDocumentMetadata.digitally_available'),
            FieldRow('IDocumentMetadata.preserved_as_paper'),
            FieldRow('IDocumentMetadata.receipt_date'),
            FieldRow('IDocumentMetadata.delivery_date'),
            TemplateRow(self.related_documents_template,
                        label=_(u'label_related_documents',
                                default=u'Related Documents')),
            FieldRow('IClassification.classification'),
            FieldRow('IClassification.privacy_layer'),
            TemplateRow(self.public_trial_template,
                        label=ogbmf('label_public_trial',
                                    default='Public Trial')),
            FieldRow('IClassification.public_trial_statement')
        ]

        if self.is_archivale_file_visible():
            row = TemplateRow(self.archival_file_template,
                              label=_(u'label_archival_file',
                                      default='Archival File'))
            rows.append(row)
            row = CustomRow(self.render_archival_file_state,
                            label=_('label_archival_file_state',
                                    default='Archival file state'))
            rows.append(row)

        if is_meeting_feature_enabled():
            rows.append(
                TemplateRow(self.submitted_with_template,
                            label=_('Submitted with')))
        return rows
Exemplo n.º 6
0
    def get_metadata_config(self):
        rows = [
            FieldRow('title'),
            FieldRow('IDocumentMetadata.document_date'),
            TemplateRow(self.file_template,
                        label=_('label_file', default='File')),
            CustomRow(self.get_creation_date,
                      label=_('label_created', default='Created')),
            CustomRow(self.get_modification_date,
                      label=_('label_modified', default='Modified')),
            FieldRow('IDocumentMetadata.document_type'),
            FieldRow('IDocumentMetadata.document_author'),
            CustomRow(self.render_creator_link,
                      label=_('label_creator', default='creator')),
            WebIntelligentFieldRow('IDocumentMetadata.description'),
            TemplateRow(self.keywords_template,
                        label=_(u'label_keywords', default=u'Keywords')),
            FieldRow('IDocumentMetadata.foreign_reference'),
            CustomRow(self.render_checked_out_link,
                      label=_('label_checked_out', default='Checked out')),
            FieldRow('IDocumentMetadata.digitally_available'),
            FieldRow('IDocumentMetadata.preserved_as_paper'),
            FieldRow('IDocumentMetadata.receipt_date'),
            FieldRow('IDocumentMetadata.delivery_date'),
            TemplateRow(self.related_documents_template, label=_(
                u'label_related_documents', default=u'Related Documents')),
            FieldRow('IClassification.classification'),
            FieldRow('IClassification.privacy_layer'),
            TemplateRow(self.public_trial_template,
                        label=ogbmf('label_public_trial',
                                    default='Public Trial')),
            FieldRow('IClassification.public_trial_statement')
        ]

        if self.is_archivale_file_visible():
            row = TemplateRow(
                self.archival_file_template,
                label=_(u'label_archival_file', default='Archival File'))
            rows.append(row)
            row = CustomRow(self.render_archival_file_state,
                            label=_('label_archival_file_state',
                                    default='Archival file state'))
            rows.append(row)

        if is_meeting_feature_enabled():
            rows.append(TemplateRow(self.submitted_with_template,
                                    label=_('Submitted with')))
        return rows