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
Xavier Thompson
erp5
Commits
dfeb02bb
Commit
dfeb02bb
authored
Aug 06, 2014
by
Romain Courteaud
Committed by
Cédric de Saint Martin
Oct 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add parent link on document
(cherry picked from commit
a1c67b06
)
parent
2aebe829
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
...tal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
+15
-9
bt5/erp5_hal_json_style/bt/revision
bt5/erp5_hal_json_style/bt/revision
+1
-1
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
View file @
dfeb02bb
...
@@ -417,6 +417,20 @@ elif (mode == \'root\') or (mode == \'traverse\'):\n
...
@@ -417,6 +417,20 @@ elif (mode == \'root\') or (mode == \'traverse\'):\n
},\n
},\n
"name": traversed_document.getPortalType(),\n
"name": traversed_document.getPortalType(),\n
}\n
}\n
\n
# Return info about container\n
if not is_portal:\n
container = traversed_document.getParentValue()\n
if container != portal:\n
# Jio does not support fetching the root document for now\n
result_dict[\'_links\'][\'parent\'] = {\n
"href": default_document_uri_template % {\n
"root_url": site_root.absolute_url(),\n
"relative_url": container.getRelativeUrl(), \n
"script_id": script.id\n
},\n
"name": container.getTitle(),\n
}\n
\n
\n
# XXX Loop on form rendering\n
# XXX Loop on form rendering\n
erp5_action_dict = portal.Base_filterDuplicateActions(\n
erp5_action_dict = portal.Base_filterDuplicateActions(\n
...
@@ -454,15 +468,7 @@ elif (mode == \'root\') or (mode == \'traverse\'):\n
...
@@ -454,15 +468,7 @@ elif (mode == \'root\') or (mode == \'traverse\'):\n
# \'name\': view_action[\'name\']\n
# \'name\': view_action[\'name\']\n
# })\n
# })\n
\n
\n
# # XXX Check that traversed_document is not the portal\n
\n
# if (traversed_document.getRelativeUrl() != portal.getRelativeUrl()) and (traversed_document.getRelativeUrl() != site_root.getRelativeUrl()):\n
# parent = traversed_document.getParentValue()\n
# if (is_web_mode and (parent.getRelativeUrl() != portal.getRelativeUrl())):\n
# result_dict[\'_links\'][\'parent\'] = {\n
# \'href\': \'%s\' % parent.absolute_url(),\n
# \'name\': parent.getTitle()\n
# }\n
# \n
# if (renderer_form is not None):\n
# if (renderer_form is not None):\n
# traversed_document_property_dict, renderer_form_json = traversed_document.Base_renderFormAsSomething(renderer_form)\n
# traversed_document_property_dict, renderer_form_json = traversed_document.Base_renderFormAsSomething(renderer_form)\n
# result_dict[\'_embedded\'] = {\n
# result_dict[\'_embedded\'] = {\n
...
...
bt5/erp5_hal_json_style/bt/revision
View file @
dfeb02bb
25
26
\ No newline at end of file
\ No newline at end of file
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