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
Douglas
erp5
Commits
3cab1250
Commit
3cab1250
authored
Apr 10, 2014
by
Kazuhiko Shiozaki
Committed by
Vincent Pelletier
Sep 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
knowledge pad predicate should be evaluated on real_context, not knowledge pad itself.
parent
9e36364a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_getBoxColumnLayout.xml
...ns/erp5_knowledge_pad/KnowledgePad_getBoxColumnLayout.xml
+5
-3
bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/WebSection_viewKnowledgePadColumn.xml
.../erp5_knowledge_pad/WebSection_viewKnowledgePadColumn.xml
+1
-1
No files found.
bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/KnowledgePad_getBoxColumnLayout.xml
View file @
3cab1250
...
...
@@ -50,7 +50,9 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
layout = []\n
<value>
<string>
if real_context is None:\n
real_context = context\n
layout = []\n
added_box_ids = []\n
all_box_ids = []\n
boxes = context.contentValues(portal_type = \'Knowledge Box\', \n
...
...
@@ -58,7 +60,7 @@ boxes = context.contentValues(portal_type = \'Knowledge Box\', \n
isAnon = context.portal_membership.isAnonymousUser()\n
validation_state_map = {1: (\'public\',),\n
0: (\'visible\', \'invisible\', \'public\',)}\n
boxes = filter(lambda x: x.getValidationState() in validation_state_map[isAnon] and x.test(context), boxes)\n
boxes = filter(lambda x: x.getValidationState() in validation_state_map[isAnon] and x.test(
real_
context), boxes)\n
for box in boxes:\n
all_box_ids.append(box.getId())\n
\n
...
...
@@ -88,7 +90,7 @@ return layout\n
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
real_context=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/WebSection_viewKnowledgePadColumn.xml
View file @
3cab1250
...
...
@@ -54,7 +54,7 @@
\'portal-column\');\n
id python: \'portal-column-%s\' %pad_column"
>
\n
\n
<tal:block
define=
"layout
active_knowledge_pad/KnowledgePad_getBoxColumnLayout
"
\n
<tal:block
define=
"layout
python:active_knowledge_pad.KnowledgePad_getBoxColumnLayout(real_context=here)
"
\n
condition=
"python: len(layout)>=pad_column+1"
\n
replace=
"structure python:\n
active_knowledge_pad.KnowledgePad_viewColumnWidget(section_layout=layout[pad_column], \n
...
...
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