File tree 4 files changed +45
-6
lines changed
src/design/plone/contenttypes
4 files changed +45
-6
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ Changelog
11
11
[lucabel]
12
12
- Add upgrade-step to add missing metadata for image captions.
13
13
[cekk]
14
+ - Add "data fine effettiva" for events, to order listing correctly
15
+ [lucabel]
14
16
15
17
16
18
6.3.4 (2025-03-07)
Original file line number Diff line number Diff line change 72
72
provides =" Products.GenericSetup.interfaces.EXTENSION"
73
73
directory =" profiles/remove_eea_api_taxonomy"
74
74
/>
75
+
76
+ <genericsetup : registerProfile
77
+ name =" to_7313"
78
+ title =" Design Plone: Content-types to 7313"
79
+ description =" Fix control panel of design.plone.contenttypes add-on."
80
+ provides =" Products.GenericSetup.interfaces.EXTENSION"
81
+ directory =" profiles/to_7313"
82
+ />
83
+
75
84
<utility
76
85
factory =" .setuphandlers.HiddenProfiles"
77
86
name =" design.plone.contenttypes-hiddenprofiles"
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <registry xmlns : i18n =" http://xml.zope.org/namespaces/i18n"
3
+ i18n : domain =" plone"
4
+ >
5
+ <records interface =" plone.app.querystring.interfaces.IQueryField"
6
+ prefix =" plone.app.querystring.field.effectiveend" >
7
+ <value key =" title" i18n : translate =" effectivestart" >Data effettiva di fine evento</value >
8
+ <value key =" description" >Criterio per ricerche che si basano sulla data effettiva di fine</value >
9
+ <value key =" enabled" >True</value >
10
+ <value key =" sortable" >True</value >
11
+ <value key =" operations" >
12
+ <element >plone.app.querystring.operation.date.lessThan</element >
13
+ <element >plone.app.querystring.operation.date.largerThan</element >
14
+ <element >plone.app.querystring.operation.date.between</element >
15
+ <element >plone.app.querystring.operation.date.lessThanRelativeDate</element >
16
+ <element >plone.app.querystring.operation.date.largerThanRelativeDate</element >
17
+ <element >plone.app.querystring.operation.date.today</element >
18
+ <element >plone.app.querystring.operation.date.beforeToday</element >
19
+ <element >plone.app.querystring.operation.date.afterToday</element >
20
+ <element >plone.app.querystring.operation.date.beforeRelativeDate</element >
21
+ <element >plone.app.querystring.operation.date.afterRelativeDate</element >
22
+ </value >
23
+ <value i18n : translate =" " i18n : domain =" plone" key =" group" >Dates</value >
24
+ </records >
25
+ </registry >
Original file line number Diff line number Diff line change @@ -201,21 +201,24 @@ def to_7312(context):
201
201
202
202
def to_7313 (context ):
203
203
logger .info ("Update registry" )
204
- update_registry (context )
205
- logger .info ("Add new effectiveend (DateRecurringIndex) index" )
204
+ context .runImportStepFromProfile (
205
+ "profile-design.plone.contenttypes:to_7313" ,
206
+ "plone.app.registry" , False )
206
207
208
+ logger .info ("Add new effectiveend (DateRecurringIndex) index" )
207
209
class extra :
208
210
recurdef = "recurrence"
209
211
until = ""
210
212
211
213
name = "effectiveend"
212
214
catalog = api .portal .get_tool (name = "portal_catalog" )
213
- catalog .addIndex (name , "DateRecurringIndex" , extra = extra ())
214
- logger .info ("Catalog DateRecurringIndex {} created." .format (name ))
215
+
216
+ if 'effectiveend' not in catalog .indexes ():
217
+ catalog .addIndex (name , "DateRecurringIndex" , extra = extra ())
218
+ logger .info ("Catalog DateRecurringIndex {} created." .format (name ))
215
219
216
220
logger .info ("Reindex Events" )
217
- pc = api .portal .get_tool (name = "portal_catalog" )
218
- brains = pc (portal_type = "Event" )
221
+ brains = catalog (portal_type = "Event" )
219
222
tot = len (brains )
220
223
for i , brain in enumerate (brains ):
221
224
if i % 15 == 0 :
You can’t perform that action at this time.
0 commit comments