Commit 80e5fa33 authored by Roque Porchetto's avatar Roque Porchetto

erp5_wendelin_telecom_UI: render one-key metadata

parent 44757efb
......@@ -19,6 +19,9 @@
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
<div id="html_report"/>
<div class="ui-field-contain">
<label for="field_my_title" id="text_content_title"></label>
</div>
<div style="white-space:pre-wrap;margin:20px;margin-left:50px" id="text_content"/>
</body>
</html>
\ No newline at end of file
......@@ -138,6 +138,12 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
......@@ -197,4 +203,63 @@
</tuple>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>969.17646.2966.35208</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1533040309.65</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
/*global window, rJS */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, calculatePageTitle, jIO) {
(function (window, rJS, document, RSVP, calculatePageTitle, jIO) {
"use strict";
rJS(window)
......@@ -54,6 +54,12 @@
};
group_list.push(["right",[["my_reference"]]])
if (metadata != null) {
if (Object.keys(metadata).length == 1) {
var key = Object.keys(metadata)[0]
document.getElementById("text_content_title").innerHTML = key;
document.getElementById("text_content").innerHTML = metadata[key];
}
else {
var i = 0
for (var key in metadata) {
if (metadata.hasOwnProperty(key)) {
......@@ -68,6 +74,7 @@
i++;
}
}
}
else {
view_dict["my_metadata"] = {
"title": "Metadata",
......@@ -126,7 +133,7 @@
}
return this.changeState({"metadata" : json_dict });
});
}(window, rJS, RSVP, calculatePageTitle, jIO));
}(window, rJS, document, RSVP, calculatePageTitle, jIO));
......
......@@ -232,7 +232,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>969.16324.59873.53640</string> </value>
<value> <string>969.17646.40993.45789</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1532962227.81</float>
<float>1533040886.97</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment