Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
5080e33c
Commit
5080e33c
authored
Jan 08, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_hal_json_style: put the web site in the acquisition context + keep_items
parent
4a36016f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_redirect.py
...ateItem/portal_skins/erp5_hal_json_style/Base_redirect.py
+9
-2
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_redirect.py
View file @
5080e33c
...
@@ -60,10 +60,17 @@ result_dict = {
...
@@ -60,10 +60,17 @@ result_dict = {
}
}
}
}
# Put the web site in the acquisition context
# this occurs when doing a .getObject from the catalog for example
if
(
not
context
.
isWebMode
())
and
(
context
.
REQUEST
.
get
(
'web_section_value'
,
None
)
is
not
None
):
portal
=
context
.
getPortalObject
()
web_section
=
portal
.
restrictedTraverse
(
"/"
.
join
(
context
.
REQUEST
[
'web_section_value'
]))
context
=
web_section
.
restrictedTraverse
(
context
.
getRelativeUrl
())
# form_id = 'view' means use default document view. Let the JS handle it
# form_id = 'view' means use default document view. Let the JS handle it
# In case of dialog submit, if redirecting to the original form, let the JS handle the navigation history
# In case of dialog submit, if redirecting to the original form, let the JS handle the navigation history
if
(
form_id
is
not
None
)
and
\
if
(
form_id
not
in
[
None
,
'Base_viewFakePythonScriptActionForm'
,
'Base_viewFakeJumpForm'
]
)
and
\
(
form_id
not
in
[
'view'
,
'Base_viewFakePythonScriptActionForm'
]
)
and
\
(
(
form_id
!=
'view'
)
or
(
keep_items
)
)
and
\
(
form_id
!=
previous_form_id
)
and
\
(
form_id
!=
previous_form_id
)
and
\
(
not
form_id
.
startswith
(
'http'
))
and
\
(
not
form_id
.
startswith
(
'http'
))
and
\
(
context
.
isWebMode
()):
(
context
.
isWebMode
()):
...
...
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