Skip to content

Commit

Permalink
Fix configlet icon for Plone 6
Browse files Browse the repository at this point in the history
This refs #135
  • Loading branch information
laulaz authored and petschki committed Jul 12, 2022
1 parent 4a4e8a2 commit 85430a3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Changes
2.2.2 (2022-07-12)
------------------

- Fix configlet icon for Plone 6 (#135)
[laulaz]

- Use new 'Manage taxonomies' permission for taxonomies configlet (#134)
Permission is by default assigned to Manager and Site Administrator roles.
[laulaz]
Expand Down
2 changes: 1 addition & 1 deletion src/collective/taxonomy/profiles/default/controlpanel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
category="Products"
condition_expr=""
url_expr="string:${portal_url}/@@taxonomy-settings"
icon_expr="string:$portal_url/product_icon.png"
icon_expr="string:puzzle"
visible="True"
i18n:attributes="title">
<permission>Manage taxonomies</permission>
Expand Down
4 changes: 3 additions & 1 deletion src/collective/taxonomy/upgradesteps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from logging import getLogger
from plone import api
from plone.behavior.interfaces import IBehavior
from Products.CMFCore.Expression import Expression
from .interfaces import ITaxonomy

log = getLogger("collective.taxonomy:upgrades")
Expand Down Expand Up @@ -47,7 +48,7 @@ def fix_metadata(tool):
utility.order[lang] = order


def use_new_configlet_permission(tool):
def update_configlet_properties(tool):
tool.runImportStepFromProfile(
"profile-collective.taxonomy:default",
"rolemap",
Expand All @@ -56,3 +57,4 @@ def use_new_configlet_permission(tool):
for action in pc._actions:
if action.id == "taxonomies":
action.permissions = ("Manage taxonomies",)
action.icon_expr = Expression("string:puzzle")
4 changes: 2 additions & 2 deletions src/collective/taxonomy/upgradesteps.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
source="1005"
destination="1006">
<genericsetup:upgradeStep
handler=".upgradesteps.use_new_configlet_permission"
title="Use new 'Manage taxonomies' permission for configlet"
handler=".upgradesteps.update_configlet_properties"
title="Use new 'Manage taxonomies' permission / update icon for configlet"
description=""
/>
</genericsetup:upgradeSteps>
Expand Down

0 comments on commit 85430a3

Please sign in to comment.