Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Carlos Ramos Carreño
slapos.core
Commits
fb7dfd87
Commit
fb7dfd87
authored
Feb 10, 2014
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support document creation inside module.
parent
5e3efc5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
31 deletions
+7
-31
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
...tal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
+6
-30
master/bt5/slapos_jio/bt/revision
master/bt5/slapos_jio/bt/revision
+1
-1
No files found.
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
View file @
fb7dfd87
...
@@ -727,36 +727,12 @@ elif mode == \'newContent\':\n
...
@@ -727,36 +727,12 @@ elif mode == \'newContent\':\n
if REQUEST.other[\'method\'] != "POST":\n
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
response.setStatus(405)\n
return ""\n
return ""\n
# # XXX SlapOS custom API\n
portal_type = REQUEST.form["portal_type"]\n
# portal_type = REQUEST.form["portal_type"]\n
module = portal.getDefaultModule(portal_type=portal_type)\n
# if portal_type == "Computer":\n
document = module.newContent(\n
# person = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
portal_type=portal_type\n
# request_kw = dict(computer_title=REQUEST.form["title"])\n
)\n
# person.requestComputer(**request_kw)\n
return document.Base_redirect(form_id=script.id)\n
# computer = context.restrictedTraverse(context.REQUEST.get(\'computer\'))\n
# return computer.Base_redirect(form_id=script.id)\n
# \n
# elif portal_type == "Computer Network":\n
# # XXX Copy/Paste from WebSection_registerNewNetwork\n
# reference = "NET-%s" % portal.portal_ids.generateNewId(\n
# id_group=\'slap_network_reference\',\n
# id_generator=\'uid\')\n
# module = portal.getDefaultModule(portal_type=portal_type)\n
# network = module.newContent(\n
# portal_type=portal_type,\n
# title=REQUEST.form["title"],\n
# reference=reference,\n
# source_administration=context.ERP5Site_getAuthenticatedMemberPersonValue().getRelativeUrl()\n
# )\n
# network.validate()\n
# return network.Base_redirect(form_id=script.id)\n
# \n
# else:\n
# raise NotImplementedError, "Can not add %s" % portal_type\n
# return ""\n
\n
raise NotImplementedError, "Can not add %s" % portal_type\n
\n
\n
\n
elif mode == \'form\':\n
elif mode == \'form\':\n
#################################################\n
#################################################\n
...
...
master/bt5/slapos_jio/bt/revision
View file @
fb7dfd87
3
4
\ 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