Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More SearchableText additions and fixes #181

Merged
merged 1 commit into from
Jun 5, 2024
Merged
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
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
Loading