Commit 73e720ba authored by Roque's avatar Roque

erp5_officejs: get rid of hardcoded post module rendering (WIP)

- use generic form view to render post list form
parent eb3a5942
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>975.17663.19549.38007</string> </value> <value> <string>975.33670.15324.9233</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1556202309.43</float> <float>1557077120.63</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
}) })
.declareMethod("renderSubGadget", function (options, subgadget, form_json) { .declareMethod("renderSubGadget", function (options, subgadget, form_json) {
var this_gadget = this, erp5_document = form_json.erp5_document; var this_gadget = this, erp5_document = form_json.erp5_document, add_url;
return subgadget.render({ return subgadget.render({
jio_key: options.jio_key, jio_key: options.jio_key,
doc: options.doc, doc: options.doc,
...@@ -138,6 +138,7 @@ ...@@ -138,6 +138,7 @@
erp5_document = form_json.erp5_document; erp5_document = form_json.erp5_document;
if (erp5_document._links && erp5_document._links.action_object_new_content_action) { if (erp5_document._links && erp5_document._links.action_object_new_content_action) {
url_for_parameter_list.push({command: 'change', options: erp5_document._links.action_object_new_content_action}); url_for_parameter_list.push({command: 'change', options: erp5_document._links.action_object_new_content_action});
add_url = true;
} }
return RSVP.all([ return RSVP.all([
this_gadget.getUrlForList(url_for_parameter_list), this_gadget.getUrlForList(url_for_parameter_list),
...@@ -160,10 +161,12 @@ ...@@ -160,10 +161,12 @@
panel_action: true, panel_action: true,
jump_url: "", jump_url: "",
fast_input_url: "", fast_input_url: "",
front_url: url_list[6],
filter_action: true, filter_action: true,
page_title: result_list[2] page_title: result_list[2]
}; };
if (!options.front_page) {
header_dict.front_url = url_list[6];
}
} else { } else {
header_dict = { header_dict = {
selection_url: url_list[2], selection_url: url_list[2],
...@@ -181,7 +184,7 @@ ...@@ -181,7 +184,7 @@
if (options.has_more_actions) { if (options.has_more_actions) {
header_dict.actions_url = url_list[1]; header_dict.actions_url = url_list[1];
} }
if (url_list[url_list.length - 1]) { if (add_url) {
header_dict.add_url = url_list[url_list.length - 1]; header_dict.add_url = url_list[url_list.length - 1];
} }
if (result_list[1]) { if (result_list[1]) {
......
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>975.29199.21743.1211</string> </value> <value> <string>975.33665.55580.31300</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1556807969.14</float> <float>1557076245.43</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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