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
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
Mikolaï Krol
erp5
Commits
f285e172
Commit
f285e172
authored
Oct 10, 2019
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Site: stop registering CMFDefault's Images directory
parent
12e4cc8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
22 deletions
+1
-22
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+1
-22
No files found.
product/ERP5/ERP5Site.py
View file @
f285e172
...
...
@@ -2230,35 +2230,14 @@ class ERP5Generator(PortalGenerator):
"""
pass
# this lists only the skin layers of Products.CMFDefault we are actually
# interested in.
CMFDEFAULT_FOLDER_LIST
=
[
'Images'
]
def
addCMFDefaultDirectoryViews
(
self
,
p
):
"""Semi-manually create DirectoryViews since CMFDefault 2.X no longer
registers the "skins" directory, only its subdirectories, making it
unusable with Products.CMFCore.DirectoryView.addDirectoryViews."""
from
Products.CMFCore.DirectoryView
import
createDirectoryView
,
_generateKey
import
Products.CMFDefault
ps
=
p
.
portal_skins
# get the layer directories actually present
for
cmfdefault_skin_layer
in
self
.
CMFDEFAULT_FOLDER_LIST
:
reg_key
=
_generateKey
(
Products
.
CMFDefault
.
__name__
,
'skins/'
+
cmfdefault_skin_layer
)
createDirectoryView
(
ps
,
reg_key
)
def
setupDefaultSkins
(
self
,
p
):
ps
=
p
.
portal_skins
self
.
addCMFDefaultDirectoryViews
(
p
)
ps
.
manage_addProduct
[
'OFSP'
].
manage_addFolder
(
id
=
'external_method'
)
ps
.
manage_addProduct
[
'OFSP'
].
manage_addFolder
(
id
=
'custom'
)
# Set the 'custom' layer a high priority, so it remains the first
# layer when installing new business templates.
ps
[
'custom'
].
manage_addProperty
(
"business_template_skin_layer_priority"
,
100.0
,
"float"
)
skin_folder_list
=
[
'custom'
,
'external_method'
]
+
self
.
CMFDEFAULT_FOLDER_LIST
skin_folders
=
', '
.
join
(
skin_folder_list
)
skin_folders
=
', '
.
join
([
'custom'
,
'external_method'
])
ps
.
addSkinSelection
(
'View'
,
skin_folders
,
make_default
=
1
...
...
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