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
Ophélie Gagnard
slapos.core
Commits
23435825
Commit
23435825
authored
Sep 11, 2012
by
Romain Courteaud
Committed by
Cédric de Saint Martin
Sep 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the json lib instead of doing it manually
parent
8f956cb0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/AcknowledgementTool_getUserUnreadAcknowledgementJSON.xml
.../AcknowledgementTool_getUserUnreadAcknowledgementJSON.xml
+7
-12
master/bt5/vifib_web/bt/revision
master/bt5/vifib_web/bt/revision
+1
-1
No files found.
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting_theme/AcknowledgementTool_getUserUnreadAcknowledgementJSON.xml
View file @
23435825
...
@@ -50,19 +50,14 @@
...
@@ -50,19 +50,14 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
import json\n
<value>
<string>
result_list = context.AcknowledgementTool_getUserUnreadAcknowledgementList()\n
person = context.ERP5Site_getAuthenticatedMemberPersonValue()\n
if len(result_list):\n
if person is not None:\n
result_list = context.AcknowledgementTool_getUserUnreadAcknowledgementList()\n
if len(result_list):\n
result_list = [result_list[0]]\n
result_list = [result_list[0]]\n
\n
\n
\n
import json
\n
result = {\n
result = {\n
"result": [{"text_content": "%s" % x[\'text_content\'], "acknowledge_url": "%s" % x[\'acknowledge_url\']} for x in result_list]\n
"result": [{"text_content": "%s" % x[\'text_content\'], "acknowledge_url": "%s" % x[\'acknowledge_url\']} for x in result_list]\n
}\n
}\n
else:\n
result = {\'result\': []}\n
\n
\n
context.REQUEST.RESPONSE.setHeader(\'Content-Type\', \'application/json\')\n
context.REQUEST.RESPONSE.setHeader(\'Content-Type\', \'application/json\')\n
return json.dumps(result)\n
return json.dumps(result)\n
...
...
master/bt5/vifib_web/bt/revision
View file @
23435825
435
436
\ 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