Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

folder_contents icons missing in classic UI after migration Products.CMFCore#3838 #337

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/337.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix missing folder_contents icons in classic UI after migration from Plone 5 - see also plone/Prodcuts.CMFPlone#3838
[szakitibi]
Comment on lines +1 to +2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Fix missing folder_contents icons in classic UI after migration from Plone 5 - see also plone/Prodcuts.CMFPlone#3838
[szakitibi]
- Fix missing folder_contents icons in classic UI after migration from Plone 5 - see also plone/Prodcuts.CMFPlone#3838 [szakitibi]

It should be in a single line, otherwise it would break on pypi

2 changes: 1 addition & 1 deletion src/plone/staticresources/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<version>215</version>
<version>216</version>
<dependencies>
<dependency>profile-plone.resource:default</dependency>
</dependencies>
Expand Down
14 changes: 14 additions & 0 deletions src/plone/staticresources/upgrades/216.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:gs="http://namespaces.zope.org/genericsetup"
>

<gs:upgradeStep
source="215"
destination="216"
title="Import PLIP 3211 icon changes"
profile="plone.staticresources:default"
handler=".upgrade_v215_to_v216"
/>

</configure>
21 changes: 21 additions & 0 deletions src/plone/staticresources/upgrades/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from plone import api
from plone.registry import field
Comment on lines +1 to +2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

black complains about this file, you can use tox -e lint to fix that and commit it 👍🏾

from plone.registry.record import Record


def upgrade_v215_to_v216(context):
"""Import missing icons."""

registry = api.portal.get_tool('portal_registry')

if 'plone.icon.plone-rearrange' not in registry.records:
registry.records['plone.icon.plone-rearrange'] = Record(
field.TextLine(title='Plone Icon rearrange'),
'++plone++bootstrap-icons/sort-down-alt.svg'
)

if 'plone.icon.plone-selection' not in registry.records:
registry.records['plone.icon.plone-selection'] = Record(
field.TextLine(title='Plone Icon selection'),
'++plone++bootstrap-icons/list-ul.svg'
)
1 change: 1 addition & 0 deletions src/plone/staticresources/upgrades/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
<include file="213.zcml" />
<include file="214.zcml" />
<include file="215.zcml" />
<include file="216.zcml" />

</configure>
Loading