[simplified ui] Introduce an attribute on transfer to mark profile as simplified
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 21 Jul 2016 09:21:17 +0200
changeset 1471 573248320056
parent 1470 f4f09e845928
child 1472 bdc86d35b797
[simplified ui] Introduce an attribute on transfer to mark profile as simplified This will be used in later csets to have a much limited, hence simpler, UI. This UI should be similar as the one we have in SAEM-Ref (aka the "convergence" task). Related to #14066262
i18n/en.po
i18n/fr.po
schema/__init__.py
views/archivetransfer.py
--- a/i18n/en.po	Thu Jul 21 09:00:51 2016 +0200
+++ b/i18n/en.po	Thu Jul 21 09:21:17 2016 +0200
@@ -7376,6 +7376,18 @@
 msgid "show/hide meta fields"
 msgstr ""
 
+msgid ""
+"simplified profiles are compatible with older version of SEDA, but have not "
+"the full SEDA 2 expressivness"
+msgstr ""
+
+msgid "simplified_profile"
+msgstr ""
+
+msgctxt "SEDAArchiveTransfer"
+msgid "simplified_profile"
+msgstr ""
+
 msgid "source"
 msgstr ""
 
--- a/i18n/fr.po	Thu Jul 21 09:00:51 2016 +0200
+++ b/i18n/fr.po	Thu Jul 21 09:21:17 2016 +0200
@@ -7384,6 +7384,20 @@
 msgid "show/hide meta fields"
 msgstr "afficher / cacher le champ d'aide à la saisie"
 
+msgid ""
+"simplified profiles are compatible with older version of SEDA, but have not "
+"the full SEDA 2 expressivness"
+msgstr ""
+"un profil simplifié est compatible avec les anciennes versions du SEDA mais "
+"n'a pas toute l'expressivité de la version 2 du SEDA"
+
+msgid "simplified_profile"
+msgstr "profil simplifié"
+
+msgctxt "SEDAArchiveTransfer"
+msgid "simplified_profile"
+msgstr ""
+
 msgid "source"
 msgstr "valeur"
 
--- a/schema/__init__.py	Thu Jul 21 09:00:51 2016 +0200
+++ b/schema/__init__.py	Thu Jul 21 09:21:17 2016 +0200
@@ -98,6 +98,15 @@
     fulltextindexed = True
 
 
+class simplified_profile(RelationDefinition):
+    subject = 'SEDAArchiveTransfer'
+    object = 'Boolean'
+    default = False
+    description = _('simplified profiles are compatible with older version of SEDA, but have not '
+                    'the full SEDA 2 expressivness')
+    cardinality = '11'
+
+
 language_code = skos.Label.get_relation('language_code')
 language_code.constraints[0].max = 6
 # XXX code below may be dropped once https://www.cubicweb.org/ticket/14037638 is released
--- a/views/archivetransfer.py	Thu Jul 21 09:00:51 2016 +0200
+++ b/views/archivetransfer.py	Thu Jul 21 09:21:17 2016 +0200
@@ -42,6 +42,7 @@
 affk = uicfg.autoform_field_kwargs
 
 pvs.tag_attribute(('SEDAArchiveTransfer', 'title'), 'hidden')
+pvs.tag_attribute(('SEDAArchiveTransfer', 'simplified_profile'), 'hidden')
 pvs.tag_subject_of(('SEDAArchiveTransfer', 'seda_archival_agency', '*'), 'attributes')
 pvs.tag_subject_of(('SEDAArchiveTransfer', 'seda_transferring_agency', '*'), 'attributes')
 pvs.tag_object_of(('*', 'seda_signature', 'SEDAArchiveTransfer'), 'attributes')
@@ -66,7 +67,8 @@
                           {'rvid': vid, 'novalue_label': novalue_label})
 
 affk.set_field_kwargs('SEDAArchiveTransfer', 'title', widget=fw.TextInput({'size': 80}))
-affk.set_fields_order('SEDAArchiveTransfer', ['title', 'user_annotation'] + at_ordered_fields)
+affk.set_fields_order('SEDAArchiveTransfer',
+                      ['title', 'simplified_profile', 'user_annotation'] + at_ordered_fields)
 pvdc.set_fields_order('SEDAArchiveTransfer', ['title', 'user_annotation'] + at_ordered_fields)