changeset 2426:6c39f30444a0

plugin schema: prepend a "publisher" field after "id" in getDataFormItems with published given by PubSub service
author Goffi <goffi@goffi.org>
date Sat, 11 Nov 2017 18:34:21 +0100
parents d294527bd46f
children 07478106a10d
files src/plugins/plugin_exp_pubsub_schema.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_exp_pubsub_schema.py	Thu Nov 09 07:54:28 2017 +0100
+++ b/src/plugins/plugin_exp_pubsub_schema.py	Sat Nov 11 18:34:21 2017 +0100
@@ -239,7 +239,10 @@
                 xmlui = xml_tools.dataFormResult2XMLUI(
                     form,
                     schema_form,
-                    prepend = (('label', 'id'),('text', item_elt['id'], u'id')),
+                    # FIXME: conflicts with schema (i.e. if "id" or "publisher" already exists)
+                    #        are not checked
+                    prepend = (('label', 'id'),('text', item_elt['id'], u'id'),
+                               ('label', 'publisher'),('text', item_elt.getAttribute('publisher',''), u'publisher')),
                     filters = filters,
                     )
                 items_xmlui.append(xmlui)