Commit 2a096dc9 authored by Tomáš Peterka's avatar Tomáš Peterka

Merge branch 'feature/action-object-jio-report' into test/ui

parents 35d4f294 6117ec57
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_fast_input_jio</string>
<string>action_type/object_jio_fast_input</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_fast_input_jio</string> </value>
<value> <string>object_jio_fast_input</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_report_jio</string>
<string>action_type/object_jio_report</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_report_jio</string> </value>
<value> <string>object_jio_report</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_action_jio</string>
<string>action_type/object_jio_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_action_jio</string> </value>
<value> <string>object_jio_action</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_report_jio</string>
<string>action_type/object_jio_report</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_report_jio</string> </value>
<value> <string>object_jio_report</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......
......@@ -12,7 +12,7 @@
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td tal:content="string: ${here/portal_url}/portal_types/Foo/PortalType_addAction?id=test_action_jio&name=Open Portal Jio&category=object_action_jio&action=string:%24{portal_url}/Foo_viewDoNothingActionDialog">Create a dummy action that redirects to the portal</td>
<td tal:content="string: ${here/portal_url}/portal_types/Foo/PortalType_addAction?id=test_action_jio&name=Open Portal Jio&category=object_jio_action&action=string:%24{portal_url}/Foo_viewDoNothingActionDialog">Create a dummy action that redirects to the portal</td>
<td></td>
</tr>
<tr>
......
......@@ -75,19 +75,19 @@
.declareMethod("render", function (options) {
var gadget = this,
erp5_document,
view_list,
transition_list,
action_list;
return gadget.jio_getAttachment(options.jio_key, "links")
.push(function (result) {
erp5_document = result;
view_list = asArray(erp5_document._links.action_workflow);
action_list = asArray(erp5_document._links.action_object_action_jio)
transition_list = asArray(erp5_document._links.action_workflow);
action_list = asArray(erp5_document._links.action_object_jio_action)
.concat(asArray(erp5_document._links.action_object_clone_action));
return RSVP.all([
renderLinkList(gadget, "Actions", "gear", view_list, options.editable),
renderLinkList(gadget, "Workflow-Transitions", "random", action_list, true)
renderLinkList(gadget, "Actions", "gear", action_list, options.editable),
renderLinkList(gadget, "Workflow-Transitions", "random", transition_list, true)
]);
})
.push(function (translated_html_link_list) {
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.12737.4015.5273</string> </value>
<value> <string>962.47066.3849.6894</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1505899642.58</float>
<float>1507798684.39</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -80,7 +80,8 @@
return gadget.jio_getAttachment(options.jio_key, "links")
.push(function (result) {
erp5_document = result;
report_list = asArray(erp5_document._links.action_object_report_jio);
report_list = asArray(erp5_document._links.action_object_report_jio)
.concat(asArray(erp5_document._links.action_object_jio_report));
return RSVP.all([
renderLinkList(gadget, "Reports", "bar-chart-o", report_list, true)
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.12722.61765.38263</string> </value>
<value> <string>962.12738.3608.48128</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1505825403.24</float>
<float>1507129748.45</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -100,7 +100,7 @@
new_content_action,
form_gadget.getUrlFor({command: 'change', options: {page: "action"}}),
form_gadget.getUrlFor({command: 'display', options: {}}),
form_gadget.state.erp5_document._links.action_object_report_jio ?
form_gadget.state.erp5_document._links.action_object_jio_report ?
form_gadget.getUrlFor({command: 'change', options: {page: "export"}}) :
"",
calculatePageTitle(form_gadget, form_gadget.state.erp5_document)
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.16133.2066.40123</string> </value>
<value> <string>962.35929.60572.59682</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1502114387.31</float>
<float>1507808130.77</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -92,7 +92,7 @@
gadget.getUrlFor({command: 'selection_previous'}),
gadget.getUrlFor({command: 'selection_next'}),
gadget.getUrlFor({command: 'change', options: {page: "tab"}}),
gadget.state.erp5_document._links.action_object_report_jio ?
gadget.state.erp5_document._links.action_object_jio_report ?
gadget.getUrlFor({command: 'change', options: {page: "export"}}) :
"",
calculatePageTitle(gadget, gadget.state.erp5_document)
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.60785.60114.8243</string> </value>
<value> <string>962.35930.39344.6741</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1504874056.9</float>
<float>1507809117.8</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -25,7 +25,7 @@
</tr>
<!-- Header has a link to the export page
Here, we assume that portal_types/Bar%20Module has no object_report_jio -->
Here, we assume that portal_types/Bar%20Module has no Object JIO Report Action -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Export' and contains(@class, 'ui-disabled')]</td>
......
......@@ -30,7 +30,7 @@
</tr>
<!-- Header has a link to the export page
Here we assume that portal_types/Foo%20Module has at least one object_report_jio -->
Here we assume that portal_types/Foo%20Module has at least one Object JIO Report Action -->
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Export' and contains(@href, '#!change') and contains(@href, 'n.page=export')]</td>
......
......@@ -63,7 +63,7 @@
</tr>
<!-- Header has a link to the export page
Here, we assume that portal_types/Bar has no object_report_jio -->
Here, we assume that portal_types/Bar has no Object JIO Report Action -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Export' and contains(@class, 'ui-disabled')]</td>
......
......@@ -30,7 +30,7 @@
</tr>
<!-- Header has a link to the export page
Here, we assume that portal_types/Foo has at least one object_report_jio -->
Here, we assume that portal_types/Foo has at least one Object JIO Report Action -->
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Export' and contains(@href, '#!change') and contains(@href, 'n.page=export')]</td>
......
......@@ -18,7 +18,7 @@
</tr>
<!-- Wait for gadget to be loaded
Here we assume portal_types/Foo has at least one object_report_jio -->
Here we assume portal_types/Foo has at least one Object JIO Report Action -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_export.html']</td>
......
......@@ -18,7 +18,7 @@
</tr>
<!-- Wait for gadget to be loaded
Here we assume portal_types/Foo has at least one object_report_jio -->
Here we assume portal_types/Foo has at least one Object JIO Report Action -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_export.html']</td>
......
......@@ -18,7 +18,7 @@
</tr>
<!-- Wait for gadget to be loaded
Here we assume portal_types/Foo has at least one object_report_jio -->
Here we assume portal_types/Foo has at least one Object JIO Report Action -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_export.html']</td>
......
......@@ -18,7 +18,7 @@
</tr>
<!-- Wait for gadget to be loaded
Here we assume portal_types/Foo has at least one object_report_jio -->
Here we assume portal_types/Foo has at least one Object JIO Report Action -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_export.html']</td>
......
......@@ -57,7 +57,8 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_action_jio</string>
<string>action_type/object_jio_action</string>
<string>action_type/object_jio_action</string>
</tuple>
</value>
</item>
......@@ -69,7 +70,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>object_action_jio</string> </value>
<value> <string>object_jio_action</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -77,7 +78,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>object_action_jio</string> </value>
<value> <string>object_jio_action</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -57,7 +57,8 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_search_jio</string>
<string>action_type/object_jio_exchange</string>
<string>action_type/object_jio_exchange</string>
</tuple>
</value>
</item>
......@@ -69,7 +70,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>object_search_jio</string> </value>
<value> <string>object_jio_exchange</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -77,7 +78,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>object_search_jio</string> </value>
<value> <string>object_jio_exchange</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_fast_input</string>
<string>action_type/object_jio_fast_input</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>object_jio_fast_input</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>object_jio_fast_input</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -57,7 +57,8 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_exchange_jio</string>
<string>action_type/object_jio_report</string>
<string>action_type/object_jio_report</string>
</tuple>
</value>
</item>
......@@ -69,7 +70,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>object_exchange_jio</string> </value>
<value> <string>object_jio_report</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -77,7 +78,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>object_exchange_jio</string> </value>
<value> <string>object_jio_report</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -57,7 +57,8 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_fast_input_jio</string>
<string>action_type/object_jio_search</string>
<string>action_type/object_jio_search</string>
</tuple>
</value>
</item>
......@@ -69,7 +70,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>object_fast_input_jio</string> </value>
<value> <string>object_jio_search</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -77,7 +78,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>object_fast_input_jio</string> </value>
<value> <string>object_jio_search</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_report_jio</string>
<string>action_type/object_report_jio</string>
<string>action_type/object_report_jio</string>
<string>action_type/object_report_jio</string>
<string>action_type/object_report_jio</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>object_report_jio</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>object_report_jio</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -4,11 +4,11 @@ actions that does not provide one.
from Products.PythonScripts.standard import url_quote
if dialog_category == 'object_report':
return sorted(actions.get('object_report', []) + actions.get('object_report_jio', []), key=lambda x: x["priority"])
return sorted(actions.get('object_report', []) + actions.get('object_jio_report', []), key=lambda x: x["priority"])
elif dialog_category == 'object_exchange':
return sorted(actions.get('object_exchange', []) + actions.get('object_exchange_jio', []), key=lambda x: x["priority"])
return sorted(actions.get('object_exchange', []) + actions.get('object_jio_exchange', []), key=lambda x: x["priority"])
elif dialog_category == 'object_action':
return sorted(actions.get('object_action', []) + actions.get('object_action_jio', []), key=lambda x: x["priority"])
return sorted(actions.get('object_action', []) + actions.get('object_jio_action', []), key=lambda x: x["priority"])
if dialog_category != 'object_print':
return actions.get(dialog_category, [])
......
......@@ -101,12 +101,12 @@
<span class="first"
tal:define="search_actions actions/object_search | nothing;
exchange_actions actions/object_exchange | nothing;
exchange_jio_actions actions/object_exchange_jio | nothing;
exchange_jio_actions actions/object_jio_exchange | nothing;
report_actions actions/object_report | nothing;
report_jio_actions actions/object_report_jio | nothing;
report_jio_actions actions/object_jio_report | nothing;
button_actions actions/object_button | nothing;
fast_input_actions actions/object_fast_input | nothing;
fast_input_jio_actions actions/object_fast_input_jio | nothing;
fast_input_jio_actions actions/object_jio_fast_input | nothing;
sort_actions actions/object_sort | nothing;
ui_actions actions/object_ui | nothing;
print_actions actions/object_print | nothing;
......
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