Skip to content

Commit

Permalink
Merge pull request #181 from syslabcom/scrum-2226-even-more-searchable
Browse files Browse the repository at this point in the history
More SearchableText additions and fixes
  • Loading branch information
reinhardt authored Jun 5, 2024
2 parents 76fb8c9 + fa30c1f commit 5ba48ae
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/recensio/plone/behaviors/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class IArticle(model.Schema):
required=False,
)
directives.order_after(translatedTitle="IArticle.subtitle")
textindexer.searchable("translatedTitle")
translatedTitle = schema.TextLine(
title=_("Translated Title"),
required=False,
Expand Down
2 changes: 0 additions & 2 deletions src/recensio/plone/behaviors/base_presentation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from plone import api
from plone.app.dexterity import textindexer
from plone.autoform import directives
from plone.autoform.interfaces import IFormFieldProvider
from plone.dexterity.interfaces import IDexterityContent
Expand All @@ -26,7 +25,6 @@ class IBasePresentation(model.Schema):
required=False,
)
directives.mode(labelPresentationAuthor="display")
textindexer.searchable("labelPresentationAuthor")

reviewAuthorHonorific = schema.Choice(
title=_("Honorific Title"),
Expand Down
3 changes: 3 additions & 0 deletions src/recensio/plone/behaviors/book_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class IBookReview(model.Schema):
required=False,
)

textindexer.searchable("isbn_online")
isbn_online = schema.TextLine(
title=_("ISBN (Online)"),
description=_(
Expand Down Expand Up @@ -120,6 +121,7 @@ class IEditedVolume(model.Schema):
directives.widget(additionalTitles=DataGridFieldFactory)
textindexer.searchable("additionalTitles")

textindexer.searchable("isbn")
isbn = schema.TextLine(
title=_("ISBN"),
description=_(
Expand All @@ -132,6 +134,7 @@ class IEditedVolume(model.Schema):
required=False,
)

textindexer.searchable("isbn_online")
isbn_online = schema.TextLine(
title=_("ISBN (Online)"),
description=_(
Expand Down
5 changes: 5 additions & 0 deletions src/recensio/plone/behaviors/journal_review.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from plone.app.dexterity import textindexer
from plone.autoform import directives
from plone.autoform.interfaces import IFormFieldProvider
from plone.dexterity.interfaces import IDexterityContent
Expand All @@ -12,6 +13,7 @@

@provider(IFormFieldProvider)
class IJournalReview(model.Schema):
textindexer.searchable("issn")
issn = schema.TextLine(
title=_("ISSN"),
description=_(
Expand All @@ -21,6 +23,7 @@ class IJournalReview(model.Schema):
required=False,
)

textindexer.searchable("issn_online")
issn_online = schema.TextLine(
title=_("ISSN Online"),
description=_(
Expand Down Expand Up @@ -86,6 +89,7 @@ class IJournalReview(model.Schema):

@provider(IFormFieldProvider)
class IJournalArticleReview(model.Schema):
textindexer.searchable("issn")
issn = schema.TextLine(
title=_("ISSN"),
description=_(
Expand All @@ -95,6 +99,7 @@ class IJournalArticleReview(model.Schema):
required=False,
)

textindexer.searchable("issn_online")
issn_online = schema.TextLine(
title=_("ISSN Online"),
description=_(
Expand Down
2 changes: 1 addition & 1 deletion src/recensio/plone/behaviors/reference_authors.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class IReferenceAuthors(model.Schema):
value_type=DictRow(schema=IReferenceAuthorRowSchema, required=False),
required=False,
)
textindexer.searchable("editorial")
textindexer.searchable("referenceAuthors")

fieldset_review(["referenceAuthors"])

Expand Down

0 comments on commit 5ba48ae

Please sign in to comment.