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
Laurent S
erp5
Commits
5d770137
Commit
5d770137
authored
Feb 13, 2018
by
Xiaowu Zhang
Committed by
Ayush Tiwari
Mar 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hal_json_style&listbox: get default parameter if not defined
parent
6af84365
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
...rtal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
+3
-0
product/ERP5Form/ListBox.py
product/ERP5Form/ListBox.py
+2
-0
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
5d770137
...
...
@@ -1807,6 +1807,9 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
if
'jio_key'
not
in
contents_item
[
select
]
and
url_parameter_dict
[
select
]
and
'absolute_url'
not
in
contents_item
[
select
]:
contents_item
[
select
][
'jio_key'
]
=
traversed_document
.
getRelativeUrl
()
if
'parameter'
not
in
contents_item
[
select
]
and
getattr
(
search_result
,
'getListItemParamDict'
,
None
)
is
not
None
:
contents_item
[
select
][
'parameter'
]
=
search_result
.
getListItemParamDict
(
select
,
result_index
,
catalog_kw
[
'selection_name'
])
if
generate_view
:
if
'parameter'
in
contents_item
[
select
]:
contents_item
[
select
][
'view'
]
=
url_template_dict
[
"traverse_generator_with_parameter"
]
%
{
...
...
product/ERP5Form/ListBox.py
View file @
5d770137
...
...
@@ -2351,6 +2351,8 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine):
url
=
self
.
getObject
().
getPortalObject
().
restrictedTraverse
(
result_dict
[
'jio_key'
]).
absolute_url
()
if
'view_action'
in
result_dict
:
url
+=
result_dict
[
'view_action'
]
if
'parameter'
not
in
result_dict
and
getattr
(
brain
,
'getListItemParamDict'
,
None
)
is
not
None
:
result_dict
[
'parameter'
]
=
brain
.
getListItemParamDict
(
alias
,
self
.
index
,
selection_name
)
if
'parameter'
in
result_dict
:
url
=
'%s?%s'
%
(
url
,
make_query
(
result_dict
[
'parameter'
]))
...
...
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