diff src/plugins/plugin_exp_pubsub_schema.py @ 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 b7e24ce97a06
children 544c4d2fec45
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)