Skip to content
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
8 changes: 4 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Changelog
5.5.13 (unreleased)
-------------------

- Nothing changed yet.

- Use custom creator criteria to list only creators present in the catalog to avoid an empty list when using LDAP and many_users flag
[folix-01]

5.5.12 (2025-07-02)
-------------------
Expand Down Expand Up @@ -33,7 +33,7 @@ Changelog
[mamico]
- Fix issue with event search in @querystring-search override:
converting a timezone-aware DateTime to utcdatetime causes a problem when searching for
"today", as it shifts start=day x at 00:00 to start=day x-1 at 22:00 in GMT+2 timezone.
"today", as it shifts start=day x at 00:00 to start=day x-1 at 22:00 in GMT+2 timezone.
[lucabel]


Expand Down Expand Up @@ -116,7 +116,7 @@ Changelog
- Add dependency with collective.volto.sitesettings.
[cekk]


5.4.9 (2024-04-22)
------------------

Expand Down
1 change: 1 addition & 0 deletions src/redturtle/volto/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<include package=".browser" />
<include package=".restapi" />
<include package=".types" />
<include package=".vocabularies" />

<include file="indexers.zcml" />
<include file="monkey.zcml" />
Expand Down
2 changes: 1 addition & 1 deletion src/redturtle/volto/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>4308</version>
<version>4309</version>
<dependencies>
<dependency>profile-plone.volto:default</dependency>
<dependency>profile-plone.app.caching:with-caching-proxy</dependency>
Expand Down
28 changes: 16 additions & 12 deletions src/redturtle/volto/profiles/default/registry/criteria.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@
i18n:domain="redturtle.volto">


<records interface="plone.app.querystring.interfaces.IQueryField"
prefix="plone.app.querystring.field.exclude_from_nav">
<value key="title" i18n:translate="">Show elements excluded from navigation</value>
<value key="description" i18n:translate="">Select False to show only elements not excluded from navigation.</value>
<value key="enabled">True</value>
<value key="sortable">False</value>
<value key="operations">
<element>plone.app.querystring.operation.boolean.isTrue</element>
<element>plone.app.querystring.operation.boolean.isFalse</element>
</value>
<value key="group" i18n:translate="">Metadata</value>
</records>
<records interface="plone.app.querystring.interfaces.IQueryField"
prefix="plone.app.querystring.field.exclude_from_nav">
<value key="title" i18n:translate="">Show elements excluded from navigation</value>
<value key="description" i18n:translate="">Select False to show only elements not excluded from navigation.</value>
<value key="enabled">True</value>
<value key="sortable">False</value>
<value key="operations">
<element>plone.app.querystring.operation.boolean.isTrue</element>
<element>plone.app.querystring.operation.boolean.isFalse</element>
</value>
<value key="group" i18n:translate="">Metadata</value>
</records>

<records interface="plone.app.querystring.interfaces.IQueryField" prefix="plone.app.querystring.field.Creator" purge="False">
<value key="vocabulary">redturtle.volto.vocabularies.Creators</value>
</records>

</registry>
11 changes: 11 additions & 0 deletions src/redturtle/volto/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
from Acquisition import aq_base
from copy import deepcopy
from plone import api
from plone.app.querystring.interfaces import IQueryField
from plone.app.upgrade.utils import installOrReinstallProduct
from plone.dexterity.utils import iterSchemata
from plone.registry.interfaces import IRegistry
from plone.restapi.behaviors import IBlocks
from redturtle.volto.setuphandlers import remove_custom_googlebot
from uuid import uuid4
from zope.component import getUtility
from zope.schema import getFields


Expand Down Expand Up @@ -594,3 +597,11 @@ def should_reindex(blocks):
logger.info(f"Reindex complete. Reindexed {len(reindexed)} contents:")
for url in reindexed:
logger.info(f"- {url}")


def to_4309(context):
registry = getUtility(IRegistry)
settings = registry.forInterface(
IQueryField, prefix="plone.app.querystring.field.Creator"
)
settings.vocabulary = "redturtle.volto.vocabularies.Creators"
8 changes: 8 additions & 0 deletions src/redturtle/volto/upgrades.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,12 @@
destination="4308"
handler=".upgrades.to_4308"
/>
<genericsetup:upgradeStep
title="Change vocabulary for Creator criteria"
description=""
profile="redturtle.volto:default"
source="4308"
destination="4309"
handler=".upgrades.to_4309"
/>
</configure>
Empty file.
14 changes: 14 additions & 0 deletions src/redturtle/volto/vocabularies/configure.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:plone="http://namespaces.plone.org/plone"
i18n_domain="redturtle.volto"
>

<utility
factory=".principals.CreatorsVocabulary"
name="redturtle.volto.vocabularies.Creators"
/>

</configure>
11 changes: 11 additions & 0 deletions src/redturtle/volto/vocabularies/principals.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from plone.app.vocabularies.catalog import KeywordsVocabulary
from zope.interface import implementer
from zope.schema.interfaces import IVocabularyFactory


@implementer(IVocabularyFactory)
class CreatorsVocabulary(KeywordsVocabulary):
keyword_index = "Creator"


CreatorsVocabularyFactory = CreatorsVocabulary()
Loading