Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
b7c7d1c3
Commit
b7c7d1c3
authored
May 06, 2011
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Knowledge Pad template should belong to System Preference, not Preference.
parent
440cfcb8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
5 deletions
+14
-5
bt5/erp5_knowledge_pad/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
...eAllowedContentTypeTemplateItem/allowed_content_types.xml
+3
-0
bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_createDefaultKnowledgePadListForUser.xml
...dge_pad/ERP5Site_createDefaultKnowledgePadListForUser.xml
+9
-4
bt5/erp5_knowledge_pad/bt/revision
bt5/erp5_knowledge_pad/bt/revision
+1
-1
bt5/erp5_knowledge_pad/bt/template_portal_type_allowed_content_type_list
...dge_pad/bt/template_portal_type_allowed_content_type_list
+1
-0
No files found.
bt5/erp5_knowledge_pad/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
View file @
b7c7d1c3
...
...
@@ -18,6 +18,9 @@
<portal_type
id=
"Preference"
>
<item>
Knowledge Pad
</item>
</portal_type>
<portal_type
id=
"System Preference"
>
<item>
Knowledge Pad
</item>
</portal_type>
<portal_type
id=
"Types Tool"
>
<item>
Gadget Type
</item>
</portal_type>
...
...
bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_createDefaultKnowledgePadListForUser.xml
View file @
b7c7d1c3
...
...
@@ -54,6 +54,7 @@
\n
knowledge_pad = None\n
portal = context.getPortalObject()\n
system_pref = context.portal_preferences.getActiveSystemPreference()\n
user_pref = context.Base_getActiveGlobalKnowledgePadPreference()\n
tag = \'%s_%s_%s\' %(portal.portal_membership.getAuthenticatedMember(),\n
mode,\n
...
...
@@ -61,9 +62,13 @@ tag = \'%s_%s_%s\' %(portal.portal_membership.getAuthenticatedMember(),\n
activate_kw = {\'tag\': tag}\n
\n
is_web_mode = mode in (\'web_front\', \'web_section\',)\n
if user_pref is not None:\n
# use template from user\'s preferences \n
pref_pads = user_pref.contentValues(portal_type=\'Knowledge Pad\')\n
# try to find template KnowledgePad from System Preference (and user Preference\n
# for backward compatibility only).\n
for pref in (system_pref, user_pref):\n
if pref is None:\n
continue\n
# use template from preferences \n
pref_pads = pref.contentValues(portal_type=\'Knowledge Pad\')\n
if not is_web_mode:\n
# leave only those not having a publication_section\n
pref_pads = filter(lambda x: x.getPublicationSection() is None and x.getGroup() is None, \n
...
...
@@ -78,7 +83,7 @@ if user_pref is not None:\n
pref_pads)\n
if len(pref_pads):\n
pref_pad = pref_pads[0]\n
cp =
user_
pref.manage_copyObjects(ids=[pref_pad.getId()])\n
cp = pref.manage_copyObjects(ids=[pref_pad.getId()])\n
new_id = context.knowledge_pad_module.manage_pasteObjects(\n
cb_copy_data=cp)[0][\'new_id\']\n
knowledge_pad = context.knowledge_pad_module[new_id]\n
...
...
bt5/erp5_knowledge_pad/bt/revision
View file @
b7c7d1c3
716
\ No newline at end of file
717
\ No newline at end of file
bt5/erp5_knowledge_pad/bt/template_portal_type_allowed_content_type_list
View file @
b7c7d1c3
...
...
@@ -5,4 +5,5 @@ Gadget | Embedded File
Knowledge Pad Module | Knowledge Pad
Knowledge Pad | Knowledge Box
Preference | Knowledge Pad
System Preference | Knowledge Pad
Types Tool | Gadget Type
\ 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