Ejemplo n.º 1
0
 def get_attributes(self):
     return [
         {'id': 'reference_number',
          'title': dossier_mf(u'label_reference_number',
                              default=u'Reference Number')},
         {'id': 'title',
          'title': dossier_mf('label_title', default=u'title')},
         {'id': 'start',
          'title': dossier_mf(u'label_start', default=u'Opening Date'),
          'number_format': DATE_NUMBER_FORMAT},
         {'id': 'end',
          'title': dossier_mf(u'label_end', default=u'Closing Date'),
          'number_format': DATE_NUMBER_FORMAT},
         {'id': 'public_trial',
          'title': base_mf(u'label_public_trial', default=u'Public Trial'),
          'transform': StringTranslater(
              self.request, 'opengever.base').translate},
         {'id': 'archival_value',
          'title': base_mf(u'label_archival_value',
                           default=u'Archival value'),
          'transform': StringTranslater(
              self.request, 'opengever.base').translate},
         {'id': 'archival_value_annotation',
          'title': base_mf(u'label_archival_value_annotation',
                           default=u'archivalValueAnnotation'),
          'transform': StringTranslater(
              self.request, 'opengever.base').translate},
         {'id': 'appraisal',
          'title': base_mf(u'label_appraisal', default=u'Appraisal')},
     ]
Ejemplo n.º 2
0
 def get_attributes(self):
     return [
         {
             'id':
             'reference_number',
             'title':
             dossier_mf(u'label_reference_number',
                        default=u'Reference Number')
         },
         {
             'id': 'title',
             'title': dossier_mf('label_title', default=u'title')
         },
         {
             'id': 'start',
             'title': dossier_mf(u'label_start', default=u'Opening Date'),
             'number_format': DATE_NUMBER_FORMAT
         },
         {
             'id': 'end',
             'title': dossier_mf(u'label_end', default=u'Closing Date'),
             'number_format': DATE_NUMBER_FORMAT
         },
         {
             'id':
             'public_trial',
             'title':
             base_mf(u'label_public_trial', default=u'Public Trial'),
             'transform':
             StringTranslater(self.request, 'opengever.base').translate
         },
         {
             'id':
             'archival_value',
             'title':
             base_mf(u'label_archival_value', default=u'Archival value'),
             'transform':
             StringTranslater(self.request, 'opengever.base').translate
         },
         {
             'id':
             'archival_value_annotation',
             'title':
             base_mf(u'label_archival_value_annotation',
                     default=u'archivalValueAnnotation'),
             'transform':
             StringTranslater(self.request, 'opengever.base').translate
         },
         {
             'id': 'appraisal',
             'title': _(u'label_appraisal', default=u'Appraisal'),
             'transform': readable_appraisal
         },
     ]
Ejemplo n.º 3
0
class IOGMail(form.Schema):
    """Opengever specific behavior,
    which add a title Field to the form.
    """

    form.fieldset(
        u'common',
        label=base_mf(u'fieldset_common', u'Common'),
        fields=[u'title', 'original_message', 'message_source'])

    form.order_before(title='message')
    dexteritytextindexer.searchable('title')
    title = schema.TextLine(
        title=dossier_mf(u'label_title', default=u'Title'),
        required=False,
    )

    form.mode(original_message=DISPLAY_MODE)
    form.read_permission(original_message='cmf.ManagePortal')
    form.write_permission(original_message='cmf.ManagePortal')
    original_message = field.NamedBlobFile(
        title=_(u'label_original_message',
                default=u'Raw *.msg message before conversion'),
        required=False,
    )

    form.mode(message_source=DISPLAY_MODE)
    form.read_permission(message_source='cmf.ManagePortal')
    form.write_permission(message_source='cmf.ManagePortal')
    message_source = schema.Choice(
        title=_('label_message_source',
                default='Message source'),
        vocabulary=get_message_source_vocabulary(),
        required=False,
    )