Commit 3fdc0c82 authored by Roque's avatar Roque

erp5_officejs: layout configuration for header Add button

parent 995a37d4
......@@ -191,7 +191,8 @@
form_definition,
query_type,
query_parent,
query_reference;
query_reference,
hide_add_button;
query_reference = new SimpleQuery({
key: "reference",
operator: "",
......@@ -246,6 +247,10 @@
.push(function (actions_views_dict) {
form_definition.has_more_views = Object.keys(actions_views_dict.views).length > 1;
form_definition.has_more_actions = Object.keys(actions_views_dict.actions).length > 0;
return gadget.getSetting('hide_header_add_button');
})
.push(function (hide_add_button_setting) {
form_definition.hide_add_button = hide_add_button_setting === "1";
return form_definition;
});
});
......
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.32757.54510.63163</string> </value>
<value> <string>976.34276.53444.54016</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1560953642.79</float>
<float>1561044808.85</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -198,7 +198,9 @@
page_title = options.doc.title;
}
erp5_document = form_json.erp5_document;
if (form_json.form_definition.allowed_sub_types_list && form_json.form_definition.allowed_sub_types_list.length > 0) {
if (form_json.form_definition.allowed_sub_types_list &&
form_json.form_definition.allowed_sub_types_list.length > 0 &&
! form_json.form_definition.hide_add_button) {
url_for_parameter_list.push({command: 'change', options: {page: "create_document", jio_key: options.jio_key, portal_type: options.portal_type, allowed_sub_types_list: form_json.form_definition.allowed_sub_types_list}});
add_url = true;
}
......
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.29933.16046.63863</string> </value>
<value> <string>976.34270.16303.42564</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1560784206.19</float>
<float>1561044820.12</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -385,6 +385,16 @@
<value> <string>lines</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_hide_header_add_button</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>int</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
......@@ -472,6 +482,10 @@
<key> <string>configuration_header_jump_button</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>configuration_hide_header_add_button</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>configuration_jio_gadget_url</string> </key>
<value> <string>gadget_ojs_local_jio.html</string> </value>
......@@ -773,7 +787,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.32636.4663.31641</string> </value>
<value> <string>976.34272.58294.24337</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -791,7 +805,7 @@
</tuple>
<state>
<tuple>
<float>1560946399.88</float>
<float>1561044558.86</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