Commit 6aec6101 authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Tomáš Peterka

[renderjs_ui] Action/Export links do not mingle with editability

/reviewed-on nexedi/erp5!472
parent 4c7afb33
......@@ -18,7 +18,7 @@
* @param {string} icon - alias used in font-awesome iconset
* @param {Array} command_list - array of links obtained from ERP5 HATEOAS
*/
function renderLinkList(gadget, title, icon, erp5_link_list, editable) {
function renderLinkList(gadget, title, icon, erp5_link_list) {
return new RSVP.Queue()
.push(function () {
// obtain RJS links from ERP5 links
......@@ -28,8 +28,7 @@
"command": 'change',
"options": {
"view": erp5_link.href,
"page": undefined,
"editable": editable
"page": undefined
}
});
})
......@@ -86,8 +85,8 @@
.concat(asArray(erp5_document._links.action_object_clone_action));
return RSVP.all([
renderLinkList(gadget, "Actions", "gear", action_list, options.editable),
renderLinkList(gadget, "Workflow-Transitions", "random", transition_list, true)
renderLinkList(gadget, "Actions", "gear", action_list),
renderLinkList(gadget, "Workflow-Transitions", "random", transition_list)
]);
})
.push(function (translated_html_link_list) {
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.47066.3849.6894</string> </value>
<value> <string>963.3161.27188.50653</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1507798684.39</float>
<float>1509097440.1</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -18,7 +18,7 @@
* @param {string} icon - alias used in font-awesome iconset
* @param {Array} command_list - array of links obtained from ERP5 HATEOAS
*/
function renderLinkList(gadget, title, icon, erp5_link_list, editable) {
function renderLinkList(gadget, title, icon, erp5_link_list) {
return new RSVP.Queue()
.push(function () {
// obtain RJS links from ERP5 links
......@@ -28,8 +28,7 @@
"command": 'change',
"options": {
"view": erp5_link.href,
"page": undefined,
"editable": editable
"page": undefined
}
});
})
......@@ -84,7 +83,7 @@
.concat(asArray(erp5_document._links.action_object_jio_report));
return RSVP.all([
renderLinkList(gadget, "Reports", "bar-chart-o", report_list, true)
renderLinkList(gadget, "Reports", "bar-chart-o", report_list)
]);
})
.push(function (translated_html_link_list) {
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.12738.3608.48128</string> </value>
<value> <string>963.3162.7999.42854</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1507129748.45</float>
<float>1509097420.01</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