[PATCH 8 of 9 seda V2] [views] Add help to 'automagic' complex keyword form fields

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Mar 16 11:37:15 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1489660162 -3600
#      Thu Mar 16 11:29:22 2017 +0100
# Node ID df0aa456340131a435d3a1776fef17cda715747c
# Parent  e3ab2131880c0ec9fd2a53298fd2eb299b0eaa32
[views] Add help to 'automagic' complex keyword form fields

to make it clearer they depend on values previously selected.

Related to extranet #12351787

diff --git a/cubicweb_seda/i18n/en.po b/cubicweb_seda/i18n/en.po
--- a/cubicweb_seda/i18n/en.po
+++ b/cubicweb_seda/i18n/en.po
@@ -7824,10 +7824,16 @@ msgstr ""
 
 msgctxt "AuthorityRecord"
 msgid "seda_writer_to_object"
 msgstr ""
 
+msgid "select a type to filter out unrelated vocabularies"
+msgstr ""
+
+msgid "select first a vocabulary then type here to prompt auto-completion"
+msgstr ""
+
 msgid "service_level"
 msgstr ""
 
 msgctxt "SEDAServiceLevel"
 msgid "service_level"
diff --git a/cubicweb_seda/i18n/fr.po b/cubicweb_seda/i18n/fr.po
--- a/cubicweb_seda/i18n/fr.po
+++ b/cubicweb_seda/i18n/fr.po
@@ -7845,10 +7845,16 @@ msgstr ""
 
 msgctxt "AuthorityRecord"
 msgid "seda_writer_to_object"
 msgstr ""
 
+msgid "select a type to filter out unrelated vocabularies"
+msgstr "sélectionnez un type pour filtrer les vocabulaires correspondants"
+
+msgid "select first a vocabulary then type here to prompt auto-completion"
+msgstr "sélectionnez un vocabulaire avant de taper dans ce champ pour activer la complétion automatique"
+
 msgid "service_level"
 msgstr "valeur"
 
 msgctxt "SEDAServiceLevel"
 msgid "service_level"
diff --git a/cubicweb_seda/views/archiveunit.py b/cubicweb_seda/views/archiveunit.py
--- a/cubicweb_seda/views/archiveunit.py
+++ b/cubicweb_seda/views/archiveunit.py
@@ -589,11 +589,14 @@ class KeywordBusinessValueEntityView(vie
             self.w(u'<br/><span>{0} {1}</span>'.format(msg, kwt.view('seda.xsdmeta')))
 
 
 afs.tag_subject_of(('SEDAKeywordReference', 'seda_keyword_reference_to_scheme', '*'),
                    'main', 'attributes')
+affk.set_field_kwargs('SEDAKeywordReference', 'seda_keyword_reference_to_scheme',
+                      help=_('select a type to filter out unrelated vocabularies'))
 affk.set_field_kwargs('SEDAKeywordReference', 'seda_keyword_reference_to',
+                      help=_('select first a vocabulary then type here to prompt auto-completion'),
                       widget=widgets.ConceptAutoCompleteWidget(
                           slave_name='seda_keyword_reference_to',
                           master_name='seda_keyword_reference_to_scheme'))
 affk.set_fields_order('SEDAKeywordReference', ['user_cardinality',
                                                'seda_keyword_reference_to_scheme',


More information about the saem-devel mailing list