Commit 47aba862 authored by Tomáš Peterka's avatar Tomáš Peterka

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

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