Skip to content

Commit 876ced5

Browse files
authored
Merge pull request #176 from syslabcom/scrum-2226-subtitle-searchable
Even more searchableTexts.
2 parents 33f9ea9 + 50e7a99 commit 876ced5

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

src/recensio/plone/behaviors/editorial.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from plone.app.dexterity import textindexer
12
from plone.app.vocabularies.catalog import CatalogSource
23
from plone.app.z3cform.widget import RelatedItemsFieldWidget
34
from plone.autoform import directives
@@ -47,6 +48,7 @@ class IEditorial(model.Schema):
4748
pattern_options={"mode": "auto", "favorites": []},
4849
)
4950
# customizations
51+
textindexer.searchable("editorial")
5052
directives.order_after(editorial="IAuthors.authors")
5153
fieldset_reviewed_text(
5254
[
@@ -69,6 +71,7 @@ class IEditorialEditedVolume(model.Schema):
6971
RelatedItemsFieldWidget,
7072
pattern_options={"mode": "auto", "favorites": []},
7173
)
74+
textindexer.searchable("editorial")
7275
# customizations
7376
fieldset_edited_volume(
7477
[

src/recensio/plone/behaviors/printed_review.py

+8
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ class IPrintedReview(model.Schema):
2424
title=_("Year of publication"),
2525
required=False,
2626
)
27+
textindexer.searchable("yearOfPublication")
2728

2829
placeOfPublication = schema.TextLine(
2930
title=_("Place of publication"),
3031
required=False,
3132
)
33+
textindexer.searchable("placeOfPublication")
3234

3335
publisher = schema.TextLine(
3436
title=_("Publisher"),
@@ -40,11 +42,13 @@ class IPrintedReview(model.Schema):
4042
title=_("Year of publication (Online)"),
4143
required=False,
4244
)
45+
textindexer.searchable("yearOfPublicationOnline")
4346

4447
placeOfPublicationOnline = schema.TextLine(
4548
title=_("Place of publication (Online)"),
4649
required=False,
4750
)
51+
textindexer.searchable("placeOfPublicationOnline")
4852

4953
publisherOnline = schema.TextLine(
5054
title=_("Publisher (Online)"),
@@ -84,11 +88,13 @@ class IPrintedReviewEditedVolume(model.Schema):
8488
title=_("Year of publication"),
8589
required=False,
8690
)
91+
textindexer.searchable("yearOfPublication")
8792

8893
placeOfPublication = schema.TextLine(
8994
title=_("Place of publication"),
9095
required=False,
9196
)
97+
textindexer.searchable("placeOfPublication")
9298

9399
publisher = schema.TextLine(
94100
title=_("Publisher"),
@@ -100,11 +106,13 @@ class IPrintedReviewEditedVolume(model.Schema):
100106
title=_("Year of publication (Online)"),
101107
required=False,
102108
)
109+
textindexer.searchable("yearOfPublicationOnline")
103110

104111
placeOfPublicationOnline = schema.TextLine(
105112
title=_("Place of publication (Online)"),
106113
required=False,
107114
)
115+
textindexer.searchable("placeOfPublicationOnline")
108116

109117
publisherOnline = schema.TextLine(
110118
title=_("Publisher (Online)"),

src/recensio/plone/behaviors/reference_authors.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from collective.z3cform.datagridfield.datagridfield import DataGridFieldFactory
22
from collective.z3cform.datagridfield.row import DictRow
3+
from plone.app.dexterity import textindexer
34
from plone.autoform import directives
45
from plone.autoform.interfaces import IFormFieldProvider
56
from plone.dexterity.interfaces import IDexterityContent
@@ -42,6 +43,7 @@ class IReferenceAuthors(model.Schema):
4243
value_type=DictRow(schema=IReferenceAuthorRowSchema, required=False),
4344
required=False,
4445
)
46+
textindexer.searchable("editorial")
4547

4648
fieldset_review(["referenceAuthors"])
4749

src/recensio/plone/content/review_exhibition.py

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ class IReviewExhibition(model.Schema, IReview):
149149
value_type=RelationChoice(source=CatalogSource(portal_type="Person")),
150150
required=False,
151151
)
152+
textindexer.searchable("curators")
152153

153154
isPermanentExhibition = schema.Bool(
154155
title=_("Dauerausstellung"),

0 commit comments

Comments
 (0)