Skip to content

Commit

Permalink
Use selection.all for portal_types, review_state and Creator operations.
Browse files Browse the repository at this point in the history
  • Loading branch information
frapell committed Aug 20, 2015
1 parent 5ca204a commit 7b0835a
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
1.3.4 (unreleased)
------------------

- Use selection.all for portal_types, review_state and Creator operations.
[frapell]

- Actually convert the value to a datetime for the DateIndex query modifier.
[frapell]

Expand Down
8 changes: 8 additions & 0 deletions plone/app/querystring/profiles.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,12 @@
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<genericsetup:registerProfile
name="upgrade_to_9"
title="Querystring Upgrade profile to v9"
description=""
directory="profiles/upgrades/to_9"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

</configure>
2 changes: 1 addition & 1 deletion plone/app/querystring/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<metadata>
<version>7</version>
<version>9</version>
<dependencies>
<dependency>profile-plone.app.registry:default</dependency>
</dependencies>
Expand Down
5 changes: 3 additions & 2 deletions plone/app/querystring/profiles/default/registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
<value key="sortable">True</value>
<value key="operations">
<element>plone.app.querystring.operation.string.is</element>
<element>plone.app.querystring.operation.selection.any</element>
<element>plone.app.querystring.operation.string.currentUser</element>
</value>
<value key="group" i18n:translate="">Metadata</value>
Expand Down Expand Up @@ -443,7 +444,7 @@
<value key="enabled">True</value>
<value key="sortable">False</value>
<value key="operations">
<element>plone.app.querystring.operation.selection.is</element>
<element>plone.app.querystring.operation.selection.any</element>
</value>
<value key="vocabulary">plone.app.vocabularies.ReallyUserFriendlyTypes</value>
<value key="group" i18n:translate="">Metadata</value>
Expand All @@ -469,7 +470,7 @@
<value key="enabled">True</value>
<value key="sortable">True</value>
<value key="operations">
<element>plone.app.querystring.operation.selection.is</element>
<element>plone.app.querystring.operation.selection.any</element>
</value>
<value key="vocabulary">plone.app.vocabularies.WorkflowStates</value>
<value key="group" i18n:translate="">Metadata</value>
Expand Down
44 changes: 44 additions & 0 deletions plone/app/querystring/profiles/upgrades/to_9/registry.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<registry xmlns:i18n="http://xml.zope.org/namespaces/i18n"
i18n:domain="plone">

<records interface="plone.app.querystring.interfaces.IQueryField"
prefix="plone.app.querystring.field.portal_type">
<value key="title" i18n:translate="">Type</value>
<value key="description" i18n:translate="">An item's type (e.g. Event)</value>
<value key="enabled">True</value>
<value key="sortable">False</value>
<value key="operations">
<element>plone.app.querystring.operation.selection.any</element>
</value>
<value key="vocabulary">plone.app.vocabularies.ReallyUserFriendlyTypes</value>
<value key="group" i18n:translate="">Metadata</value>
</records>

<records interface="plone.app.querystring.interfaces.IQueryField"
prefix="plone.app.querystring.field.review_state">
<value key="title" i18n:translate="">Review state</value>
<value key="description" i18n:translate="">An item's workflow state (e.g.published)</value>
<value key="enabled">True</value>
<value key="sortable">True</value>
<value key="operations">
<element>plone.app.querystring.operation.selection.any</element>
</value>
<value key="vocabulary">plone.app.vocabularies.WorkflowStates</value>
<value key="group" i18n:translate="">Metadata</value>
</records>

<records interface="plone.app.querystring.interfaces.IQueryField"
prefix="plone.app.querystring.field.Creator">
<value key="title" i18n:translate="">Creator</value>
<value key="description" i18n:translate="">The person that created an item</value>
<value key="enabled">True</value>
<value key="sortable">True</value>
<value key="operations">
<element>plone.app.querystring.operation.string.is</element>
<element>plone.app.querystring.operation.selection.any</element>
<element>plone.app.querystring.operation.string.currentUser</element>
</value>
<value key="group" i18n:translate="">Metadata</value>
</records>

</registry>
10 changes: 10 additions & 0 deletions plone/app/querystring/upgrades.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,14 @@
/>
</genericsetup:upgradeSteps>

<genericsetup:upgradeSteps
source="8"
destination="9"
profile="plone.app.querystring:default">
<genericsetup:upgradeDepends
title="Change portal_types, review_state and Creator operations to use selection.all"
import_profile="plone.app.querystring:upgrade_to_9"
/>
</genericsetup:upgradeSteps>

</configure>

0 comments on commit 7b0835a

Please sign in to comment.