Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
f7734b0c
Commit
f7734b0c
authored
Sep 07, 2018
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_core] Link to current value in new UI
parent
c0b35430
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
8 deletions
+83
-8
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/portal_actions/display_current_value.xml
...tem/portal_types/portal_actions/display_current_value.xml
+71
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCurrentValueUrl.py
...ateItem/portal_skins/erp5_core/Base_getCurrentValueUrl.py
+9
-7
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonDifferenceList.py
...s/erp5_core/Base_getHistoricalComparisonDifferenceList.py
+2
-1
product/ERP5/bootstrap/erp5_core/bt/template_action_path_list
...uct/ERP5/bootstrap/erp5_core/bt/template_action_path_list
+1
-0
No files found.
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/portal_actions/display_current_value.xml
0 → 100644
View file @
f7734b0c
<?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>
category
</string>
</key>
<value>
<string>
object_hidden
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
display_current_value
</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>
107.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Display Current Value
</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>
python: object.absolute_url() + \'/Base_viewCurrentValueForLargeText\'
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCurrentValueUrl.py
View file @
f7734b0c
...
@@ -2,24 +2,26 @@
...
@@ -2,24 +2,26 @@
This URL script returns the URL for current value for the
This URL script returns the URL for current value for the
properties in the Historical Comparison Diff.
properties in the Historical Comparison Diff.
"""
"""
from
Products.ERP5Type.Log
import
log
if
brain
is
None
:
if
brain
is
None
:
brain
=
context
brain
=
context
# Get the name of property from the brain and send it as
# Get the name of property from the brain and send it as
# parameter to the next view
# parameter to the next view
path
=
brain
.
getProperty
(
'path'
)
path
=
brain
.
getProperty
(
'path'
)
property_name
=
path
.
split
(
'/'
)[
2
]
property_name
=
path
.
split
(
'/'
)[
-
1
]
log
(
context
.
aq_parent
)
log
(
brain
)
if
url_dict
:
if
url_dict
:
parent
=
brain
.
aq_parent
return
{
'command'
:
'push_history'
,
return
{
'command'
:
'push_history'
,
'options'
:
{
'options'
:
{
'jio_key'
:
contex
t
.
getRelativeUrl
(),
'jio_key'
:
paren
t
.
getRelativeUrl
(),
},
},
'view_kw'
:
{
'view_kw'
:
{
'jio_key'
:
context
.
getRelativeUrl
(),
'jio_key'
:
parent
.
getRelativeUrl
(),
'view'
:
'Base_viewCurrentValueForLargeText'
'view'
:
'display_current_value'
,
'extra_param_json'
:
{
'property_name'
:
property_name
}
}
}
}
}
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonDifferenceList.py
View file @
f7734b0c
...
@@ -64,12 +64,13 @@ diff = portal_diff.diffPortalObject(
...
@@ -64,12 +64,13 @@ diff = portal_diff.diffPortalObject(
tempbase_list
=
[]
tempbase_list
=
[]
uid
=
900
uid
=
900
for
x
in
diff
:
for
x
in
diff
:
property_type
=
context
.
getPropertyType
(
x
[
'path'
])
property_type
=
context
.
getPropertyType
(
x
[
'path'
])
# Check if the property type is in the list of property-types
# Check if the property type is in the list of property-types
# for the property_set sent via parameter
# for the property_set sent via parameter
if
property_type
in
PROPERTY_TYPE_LIST
.
get
(
property_set
,
()):
if
property_type
in
PROPERTY_TYPE_LIST
.
get
(
property_set
,
()):
temp_obj
=
newTempBase
(
portal
,
temp_obj
=
newTempBase
(
context
,
x
[
'path'
],
x
[
'path'
],
**
x
)
**
x
)
temp_obj
.
setProperty
(
temp_obj
.
setProperty
(
...
...
product/ERP5/bootstrap/erp5_core/bt/template_action_path_list
View file @
f7734b0c
...
@@ -160,6 +160,7 @@ portal_actions | component_tool
...
@@ -160,6 +160,7 @@ portal_actions | component_tool
portal_actions | create_module
portal_actions | create_module
portal_actions | diff_multiple_object_action
portal_actions | diff_multiple_object_action
portal_actions | diff_object_action
portal_actions | diff_object_action
portal_actions | display_current_value
portal_actions | history
portal_actions | history
portal_actions | list_ui
portal_actions | list_ui
portal_actions | make_template
portal_actions | make_template
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment