Commit c941127b authored by Romain Courteaud's avatar Romain Courteaud 🐙

slapos_panel:

* add Release view
* jump from Project to Software Product
* Release are now Software Product variation
* review View section in panel
  Needed to cancel jump view
* jump_to_slapos_software_type
parent 92b35057
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_jump</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_jump</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jump_to_slapos_software_product</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>18.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Software Products</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string encoding="cdata"><![CDATA[
string:${object_url}/Base_jumpToRelatedObject?base_category=follow_up&portal_type=Software+Product
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>slapos_panel_view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>10.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/SoftwareProductReleaseVariation_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_jump</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_jump</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jump_to_slapos_software_type</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>17.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Software Types</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string encoding="cdata"><![CDATA[
string:${object_url}/Base_jumpToRelatedObject?base_category=parent&portal_type=Software+Product+Type+Variation
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -71,7 +71,7 @@
context = this,
workflow_list,
group_mapping,
//view_list,
view_list,
action_list,
clone_list,
jump_list;
......@@ -109,7 +109,7 @@
});
workflow_list = JSON.stringify(group_mapping.action_workflow);
//view_list = JSON.stringify(group_mapping.action_object_view);
view_list = JSON.stringify(group_mapping.action_object_view);
action_list = JSON.stringify(group_mapping.action_object_jio_action);
clone_list = JSON.stringify(group_mapping.action_object_clone_action);
jump_list = JSON.stringify(group_mapping.action_object_jio_jump);
......@@ -125,7 +125,7 @@
visible: visible,
display_workflow_list: display_workflow_list,
workflow_list: workflow_list,
//view_list: view_list,
view_list: view_list,
action_list: action_list,
clone_list: clone_list,
jump_list: jump_list,
......@@ -142,7 +142,7 @@
var i,
gadget = this,
workflow_list,
view_list = [],
view_list,
action_list,
clone_list,
jump_list,
......@@ -255,7 +255,7 @@
modification_dict.hasOwnProperty("clone_list") ||
modification_dict.hasOwnProperty("jump_list") ||
modification_dict.hasOwnProperty("jio_key") ||
//modification_dict.hasOwnProperty("view_list") ||
modification_dict.hasOwnProperty("view_list") ||
modification_dict.hasOwnProperty("extra_menu_list"))) {
dl_fragment = document.createDocumentFragment();
......@@ -266,7 +266,7 @@
.push(function () {
var parameter_list = [];
//view_list = JSON.parse(gadget.state.view_list);
view_list = JSON.parse(gadget.state.view_list);
action_list = JSON.parse(gadget.state.action_list);
clone_list = JSON.parse(gadget.state.clone_list);
jump_list = JSON.parse(gadget.state.jump_list);
......@@ -285,10 +285,8 @@
});
})
.push(function (result_dict) {
/*
appendDt(dl_fragment, result_dict.translation_dict.Views, 'eye',
view_list, result_dict.url_list, 0);
*/
if (gadget.state.display_workflow_list) {
// show Workflows only on document
appendDt(dl_fragment, result_dict.translation_dict.Workflows, 'random',
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1003.51507.1368.7987</string> </value>
<value> <string>1003.51517.50494.8618</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1666346746.18</float>
<float>1666689519.78</float>
<string>UTC</string>
</tuple>
</state>
......
from Products.ERP5Type.Message import translateString
from Products.ERP5Type.Errors import UnsupportedWorkflowMethod
portal = context.getPortalObject()
software_product = context
software_release = portal.software_release_module.newContent(
title='%s - %s' % (software_product.getTitle(), version),
reference=software_product.getReference(),
url_string=url_string,
url_protocol='http',
version=version,
language='en',
effective_date=effective_date,
aggregate_value=software_product,
follow_up_value=software_product.getFollowUpValue()
software_release = software_product.newContent(
portal_type="Software Product Release Variation",
title=title,
url_string=url_string
)
try:
software_release.share()
except UnsupportedWorkflowMethod:
# Agent can not share a software release
software_release.submit()
return software_release.Base_redirect(
keep_items={
'portal_status_message': translateString('New Software Release created.')
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>url_string, version, effective_date, **kw</string> </value>
<value> <string>title, url_string, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -90,9 +90,8 @@
<key> <string>left</string> </key>
<value>
<list>
<string>your_title</string>
<string>your_url_string</string>
<string>your_version</string>
<string>your_effective_date</string>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default_now</string>
<string>description</string>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_effective_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default_now</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The date when a document is published.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_date_time_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Publication Date</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -10,6 +10,7 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>input_type</string>
<string>required</string>
<string>title</string>
</list>
......@@ -17,7 +18,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_version</string> </value>
<value> <string>your_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -72,13 +73,17 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string>url</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Version</string> </value>
<value> <string>Title</string> </value>
</item>
</dictionary>
</value>
......
......@@ -16,6 +16,7 @@ Mail Message | slapos_panel_view
Project Module | slapos_panel_view
Project | add_slapos_compute_node
Project | add_slapos_software_product
Project | jump_to_slapos_software_product
Project | request_slapos_instance_tree
Project | slapos_panel_view
Regularisation Request Module | slapos_panel_view
......@@ -27,8 +28,10 @@ Software Installation | slapos_panel_view
Software Instance Module | slapos_panel_view
Software Instance | slapos_panel_view
Software Product Module | slapos_panel_view
Software Product Release Variation | slapos_panel_view
Software Product | add_slapos_software_release
Software Product | jump_to_slapos_software_release
Software Product | jump_to_slapos_software_type
Software Product | slapos_panel_view
Software Release Module | slapos_panel_view
Software Release | slapos_panel_view
......
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