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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
a1c67b06
Commit
a1c67b06
authored
Aug 06, 2014
by
Romain Courteaud
Committed by
Sebastien Robin
Aug 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add parent link on document
parent
fc4cc8f3
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 @
a1c67b06
...
...
@@ -417,6 +417,20 @@ elif (mode == \'root\') or (mode == \'traverse\'):\n
},\n
"name": traversed_document.getPortalType(),\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
# XXX Loop on form rendering\n
erp5_action_dict = portal.Base_filterDuplicateActions(\n
...
...
@@ -454,15 +468,7 @@ elif (mode == \'root\') or (mode == \'traverse\'):\n
# \'name\': view_action[\'name\']\n
# })\n
\n
# # XXX Check that traversed_document is not the portal\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
\n
# if (renderer_form is not None):\n
# traversed_document_property_dict, renderer_form_json = traversed_document.Base_renderFormAsSomething(renderer_form)\n
# result_dict[\'_embedded\'] = {\n
...
...
bt5/erp5_hal_json_style/bt/revision
View file @
a1c67b06
25
\ No newline at end of file
26
\ 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