-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix Based Near functionality #855
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
<%= presenter.attribute_to_html(:identifier, render_as: :linked, search_field: 'identifier_tesim') %> | ||
<% end %> | ||
<%= presenter.attribute_to_html(:keyword, render_as: :faceted) %> | ||
<%= presenter.attribute_to_html(:based_near_label, render_as: :faceted) %> | ||
<%= presenter.attribute_to_html(:based_near_label) %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rendering the text as faceted resulted in an empty search so I removed the facet. |
||
<%= presenter.attribute_to_html(:related_url, render_as: :external_link) %> | ||
<% if can? :read, :admin_dashboard %> | ||
<%= presenter.attribute_to_html(:resource_type, render_as: :faceted) %> | ||
|
@@ -37,7 +37,6 @@ | |
<%= presenter.attribute_to_html(:refereed, render_as: :faceted, label: I18n.t('dog_biscuits.fields.refereed')) %> | ||
<%= presenter.attribute_to_html(:pagination, label: I18n.t('dog_biscuits.fields.pagination')) %> | ||
<%= presenter.attribute_to_html(:doi, label: I18n.t('dog_biscuits.fields.doi')) %> | ||
<%= presenter.attribute_to_html(:based_near, label: I18n.t('dog_biscuits.fields.based_near')) %> | ||
<%= presenter.attribute_to_html(:resource_type_general, label: I18n.t('dog_biscuits.fields.resource_type_general')) %> | ||
<%= presenter.attribute_to_html(:funder, label: I18n.t('dog_biscuits.fields.funder'), render_as: :faceted) %> | ||
<%= presenter.attribute_to_html(:output_of, label: I18n.t('dog_biscuits.fields.output_of')) %> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,23 +3,14 @@ | |
|
||
Rails.application.config.after_initialize do | ||
# Add all concerns that are migrating from ActiveFedora here | ||
CONCERNS = [ConferenceItem, Dataset, ExamPaper, GenericWork, Image, JournalArticle, PublishedWork, Thesis].freeze | ||
CONCERNS = [ConferenceItem, Dataset, Etd, ExamPaper, GenericWork, Image, JournalArticle, PublishedWork, Thesis].freeze | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @laritakr Should Oer need to be in here too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At this point, we should leave OER and ETD out because those two work types aren't functioning right for adventist and that's a separate ticket to fix them |
||
|
||
CONCERNS.each do |klass| | ||
Wings::ModelRegistry.register("#{klass}Resource".constantize, klass) | ||
# we register itself so we can pre-translate the class in Freyja instead of having to translate in each query_service | ||
Wings::ModelRegistry.register(klass, klass) | ||
end | ||
|
||
Wings::ModelRegistry.register(ConferenceItemResource, ConferenceItem) | ||
Wings::ModelRegistry.register(DatasetResource, Dataset) | ||
Wings::ModelRegistry.register(ExamPaperResource, ExamPaper) | ||
Wings::ModelRegistry.register(GenericWorkResource, GenericWork) | ||
Wings::ModelRegistry.register(ImageResource, Image) | ||
Wings::ModelRegistry.register(JournalArticleResource, JournalArticle) | ||
Wings::ModelRegistry.register(PublishedWorkResource, PublishedWork) | ||
Wings::ModelRegistry.register(ThesisResource, Thesis) | ||
|
||
Valkyrie.config.resource_class_resolver = lambda do |resource_klass_name| | ||
# TODO: Can we use some kind of lookup. | ||
klass_name = resource_klass_name.gsub(/Resource$/, '') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the form so you don't have to hit + to open the location before searching