Skip to content

Commit cc1d6fd

Browse files
committed
Fix icon_expr and ask for content_type icon
1 parent 4fd4608 commit cc1d6fd

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGES.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Breaking changes:
1010

1111
New features:
1212

13-
- *add item here*
13+
- Add `icon_expr` for `content_type`` view/edit actions and ask for "Content type icon" when adding a `content_type`.
14+
[petschki]
1415

1516
Bug fixes:
1617

bobtemplates/plone/content_type/.mrbob.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ dexterity_type_desc.help = Describe your content type in a view words.
1919
dexterity_type_desc.required = False
2020
dexterity_type_desc.default =
2121

22+
dexterity_type_icon_expr.question = Content type icon (See https://icons.getbootstrap.com/)
23+
dexterity_type_icon_expr.help =
24+
dexterity_type_icon_expr.required = False
25+
dexterity_type_icon_expr.default = puzzle
26+
2227
dexterity_type_supermodel.question = Use XML Model
2328
dexterity_type_supermodel.help = Use plone.supermodel, if not we will use zope.schema.
2429
dexterity_type_supermodel.required = True

bobtemplates/plone/content_type/profiles/default/types/+dexterity_type_fti_file_name+.xml.bob

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<property name="allow_discussion">False</property>
1616
<property name="factory">{{{ dexterity_type_name }}}</property>
17-
<property name="icon_expr"></property>
17+
<property name="icon_expr">string:{{{ dexterity_type_icon_expr }}}</property>
1818
<property name="link_target"></property>
1919

2020
<!-- Hierarchy control -->
@@ -121,6 +121,7 @@
121121
i18n:attributes="title"
122122
i18n:domain="plone"
123123
title="View"
124+
icon_expr="string:toolbar-action/view"
124125
url_expr="string:${object_url}"
125126
visible="True">
126127
<permission value="View"/>
@@ -136,6 +137,7 @@
136137
i18n:attributes="title"
137138
i18n:domain="plone"
138139
title="Edit"
140+
icon_expr="string:toolbar-action/edit"
139141
url_expr="string:${object_url}/edit"
140142
visible="True">
141143
<permission value="Modify portal content"/>

0 commit comments

Comments
 (0)