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

Index embargo_length as a singluar, searchable, stored value in Solr #2095

Merged
merged 1 commit into from
Feb 25, 2021
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
2 changes: 1 addition & 1 deletion app/models/etd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def toc_embargoed
end

property :embargo_length, predicate: "http://purl.org/spar/fabio/hasEmbargoDuration", multiple: false do |index|
index.as :displayable
index.as :stored_sortable
end

# should always be Emory University (http://id.loc.gov/vocabulary/organizations/geu)
Expand Down
2 changes: 1 addition & 1 deletion app/models/solr_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def description
end

def embargo_length
self['embargo_length_ssm']
self['embargo_length_ssi']
end

def graduation_year
Expand Down
4 changes: 2 additions & 2 deletions app/presenters/etd_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def abstract_for_admin
if degree_awarded
"[Abstract embargoed until #{formatted_embargo_release_date}] "
elsif embargo_length
"[Abstract embargoed until #{embargo_length.first} post-graduation] "
"[Abstract embargoed until #{embargo_length} post-graduation] "
else
"[Abstract embargoed until post-graduation] "
end
Expand Down Expand Up @@ -154,7 +154,7 @@ def toc_for_admin
if embargo_release_date && toc_embargoed
admin_return_message +=
if embargo_length && !degree_awarded
"[Table of contents embargoed until #{embargo_length.first} post-graduation] "
"[Table of contents embargoed until #{embargo_length} post-graduation] "
elsif embargo_release_date
"[Table of contents embargoed until #{formatted_embargo_release_date}] "
else
Expand Down