Skip to content

Commit 5ba48ae

Browse files
authored
Merge pull request #181 from syslabcom/scrum-2226-even-more-searchable
More SearchableText additions and fixes
2 parents 76fb8c9 + fa30c1f commit 5ba48ae

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

src/recensio/plone/behaviors/article.py

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class IArticle(model.Schema):
3434
required=False,
3535
)
3636
directives.order_after(translatedTitle="IArticle.subtitle")
37+
textindexer.searchable("translatedTitle")
3738
translatedTitle = schema.TextLine(
3839
title=_("Translated Title"),
3940
required=False,

src/recensio/plone/behaviors/base_presentation.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from plone import api
2-
from plone.app.dexterity import textindexer
32
from plone.autoform import directives
43
from plone.autoform.interfaces import IFormFieldProvider
54
from plone.dexterity.interfaces import IDexterityContent
@@ -26,7 +25,6 @@ class IBasePresentation(model.Schema):
2625
required=False,
2726
)
2827
directives.mode(labelPresentationAuthor="display")
29-
textindexer.searchable("labelPresentationAuthor")
3028

3129
reviewAuthorHonorific = schema.Choice(
3230
title=_("Honorific Title"),

src/recensio/plone/behaviors/book_review.py

+3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class IBookReview(model.Schema):
4848
required=False,
4949
)
5050

51+
textindexer.searchable("isbn_online")
5152
isbn_online = schema.TextLine(
5253
title=_("ISBN (Online)"),
5354
description=_(
@@ -120,6 +121,7 @@ class IEditedVolume(model.Schema):
120121
directives.widget(additionalTitles=DataGridFieldFactory)
121122
textindexer.searchable("additionalTitles")
122123

124+
textindexer.searchable("isbn")
123125
isbn = schema.TextLine(
124126
title=_("ISBN"),
125127
description=_(
@@ -132,6 +134,7 @@ class IEditedVolume(model.Schema):
132134
required=False,
133135
)
134136

137+
textindexer.searchable("isbn_online")
135138
isbn_online = schema.TextLine(
136139
title=_("ISBN (Online)"),
137140
description=_(

src/recensio/plone/behaviors/journal_review.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from plone.app.dexterity import textindexer
12
from plone.autoform import directives
23
from plone.autoform.interfaces import IFormFieldProvider
34
from plone.dexterity.interfaces import IDexterityContent
@@ -12,6 +13,7 @@
1213

1314
@provider(IFormFieldProvider)
1415
class IJournalReview(model.Schema):
16+
textindexer.searchable("issn")
1517
issn = schema.TextLine(
1618
title=_("ISSN"),
1719
description=_(
@@ -21,6 +23,7 @@ class IJournalReview(model.Schema):
2123
required=False,
2224
)
2325

26+
textindexer.searchable("issn_online")
2427
issn_online = schema.TextLine(
2528
title=_("ISSN Online"),
2629
description=_(
@@ -86,6 +89,7 @@ class IJournalReview(model.Schema):
8689

8790
@provider(IFormFieldProvider)
8891
class IJournalArticleReview(model.Schema):
92+
textindexer.searchable("issn")
8993
issn = schema.TextLine(
9094
title=_("ISSN"),
9195
description=_(
@@ -95,6 +99,7 @@ class IJournalArticleReview(model.Schema):
9599
required=False,
96100
)
97101

102+
textindexer.searchable("issn_online")
98103
issn_online = schema.TextLine(
99104
title=_("ISSN Online"),
100105
description=_(

src/recensio/plone/behaviors/reference_authors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class IReferenceAuthors(model.Schema):
4343
value_type=DictRow(schema=IReferenceAuthorRowSchema, required=False),
4444
required=False,
4545
)
46-
textindexer.searchable("editorial")
46+
textindexer.searchable("referenceAuthors")
4747

4848
fieldset_review(["referenceAuthors"])
4949

0 commit comments

Comments
 (0)