Skip to content

Commit

Permalink
Merge pull request #196 from scientist-softserv/fieldsupdate
Browse files Browse the repository at this point in the history
updated field order and help text
  • Loading branch information
ckarpinski authored Nov 29, 2023
2 parents 0862749 + 014c6f5 commit ff23d62
Show file tree
Hide file tree
Showing 14 changed files with 109 additions and 107 deletions.
3 changes: 2 additions & 1 deletion app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def self.modified_field
config.add_facet_field 'contributor_sim', label: 'Contributor', limit: 5
config.add_facet_field 'keyword_sim', limit: 5, label: 'Keyword'
config.add_facet_field 'subject_sim', limit: 5, label: 'Subject'
config.add_facet_field 'location_sim', limit: 5, label: 'Location'
config.add_facet_field 'language_sim', limit: 5, label: 'Language'
config.add_facet_field 'publisher_sim', limit: 5, label: 'Publisher'
config.add_facet_field 'date_created_sim', limit: 5, label: 'Date Created'
Expand All @@ -88,7 +89,7 @@ def self.modified_field
config.add_facet_field 'event_title_sim', limit: 5, label: 'Event Title'
config.add_facet_field 'event_date_sim', limit: 5, label: 'Event Date'
config.add_facet_field 'institution_sim', limit: 5, label: 'Host Institution'
config.add_facet_field 'location_sim', limit: 5, label: 'Location'

# config.add_facet_field 'based_near_label_sim', limit: 5

# Have BL send all facet field names to Solr, which has been the default
Expand Down
4 changes: 2 additions & 2 deletions app/forms/hyrax/etd_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class EtdForm < Hyrax::Forms::WorkForm
types
]

self.terms = %i[title alternative_title creator contributor description abstract
self.terms = %i[title location alternative_title creator contributor description abstract
keyword subject rights_statement publisher advisor
committee_member department date_created year resource_type
institution degree discipline degree_granting_institution types
Expand All @@ -45,7 +45,7 @@ class EtdForm < Hyrax::Forms::WorkForm
visibility_during_embargo embargo_release_date visibility_after_embargo
visibility_during_lease lease_expiration_date visibility_after_lease
visibility ordered_member_ids source in_works_ids
member_of_collection_ids admin_set_id location]
member_of_collection_ids admin_set_id]

self.terms -= %i[
based_near
Expand Down
7 changes: 3 additions & 4 deletions app/forms/hyrax/generic_work_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class GenericWorkForm < Hyrax::Forms::WorkForm
additional_rights_info
]

self.terms = %i[title alternative_title creator contributor description abstract
keyword subject rights_statement publisher date_created
self.terms = %i[title alternative_title creator date_created contributor description
abstract subject keyword location rights_statement publisher
resource_type institution types license language format
identifier based_near access_right rights_notes related_url
video_embed bibliographic_citation additional_rights_info
Expand All @@ -28,13 +28,12 @@ class GenericWorkForm < Hyrax::Forms::WorkForm
visibility_after_embargo
visibility_during_lease lease_expiration_date visibility_after_lease
visibility ordered_member_ids source in_works_ids
member_of_collection_ids admin_set_id location]
member_of_collection_ids admin_set_id]

self.required_fields += %i[
title
creator
rights_statement
date_created
resource_type
institution
types
Expand Down
16 changes: 15 additions & 1 deletion app/forms/hyrax/image_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,24 @@ class ImageForm < Hyrax::Forms::WorkForm
format
video_embed
location]
self.terms = %i[title alternative_title creator date_created contributor
description abstract subject keyword location extent rights_statement
publisher resource_type institution types license language format
identifier based_near access_right rights_notes related_url
video_embed bibliographic_citation additional_rights_info
representative_id thumbnail_id rendering_ids files
visibility_during_embargo embargo_release_date
visibility_after_embargo
visibility_during_lease lease_expiration_date visibility_after_lease
visibility ordered_member_ids source in_works_ids
member_of_collection_ids admin_set_id]

self.required_fields += %i[institution
date_created
resource_type
types]
self.terms -= %i[based_near]
def primary_terms
super - %i[video_embed] + %i[license]
end
end
end
4 changes: 2 additions & 2 deletions app/forms/hyrax/paper_or_report_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PaperOrReportForm < Hyrax::Forms::WorkForm
types
]

self.terms = %i[title alternative_title creator contributor description abstract
self.terms = %i[title location alternative_title creator contributor description abstract
keyword subject license rights_statement publisher date_created
resource_type institution types language format rights_holder
creator_orcid creator_institutional_relationship
Expand All @@ -48,7 +48,7 @@ class PaperOrReportForm < Hyrax::Forms::WorkForm
visibility_during_embargo embargo_release_date visibility_after_embargo
visibility_during_lease lease_expiration_date visibility_after_lease
visibility ordered_member_ids source in_works_ids
member_of_collection_ids admin_set_id location]
member_of_collection_ids admin_set_id]

self.terms -= %i[
description
Expand Down
4 changes: 2 additions & 2 deletions app/views/hyrax/base/_attribute_rows.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<%= presenter.attribute_to_html(:date_created, render_as: :linked, html_dl: true, search_field: 'all_fields') %>
<%= presenter.attribute_to_html(:year, render_as: :linked, search_field: 'all_fields', html_dl: true) %>
<%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:location, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:extent, html_dl: true) %>
<%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:identifier, render_as: :linked, html_dl: true, search_field: 'all_fields') %>
<%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true) %>
Expand Down Expand Up @@ -42,5 +44,3 @@
<%= presenter.attribute_to_html(:institution, render_as: :faceted, html_dl: true) %>
<%= presenter.attribute_to_html(:date_modified, label: t('hyrax.base.show.last_modified'), html_dl: true) %>
<%= presenter.attribute_to_html(:based_near_label, html_dl: true) %>
<%= presenter.attribute_to_html(:extent, html_dl: true) %>
<%= presenter.attribute_to_html(:location, render_as: :faceted, html_dl: true) %>
65 changes: 33 additions & 32 deletions config/initializers/bulkrax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,55 +50,56 @@
# config.field_mappings["Bulkrax::OaiDcParser"]["date"] = { from: ["date"], excluded: true }

default_field_mapping = {
'abstract' => { from: ['abstract'], split: ';' },
'access_right' => { from: ['access_rights'], split: ';' },
'additional_rights_info' => { from: ['additional_rights_info'], split: ';' },
'advisor' => { from: ['advisor'], split: ';' },
'alternative_title' => { from: ['alternative_title'], split: ';' },
'bibliographic_citation' => { from: ['bibliographic_citation'], split: ';' },
'abstract' => { from: ['abstract'], split: /\s*[|]\s*/ },
'access_right' => { from: ['access_rights'], split: /\s*[;|]\s*/ },
'additional_rights_info' => { from: ['additional_rights_info'], split: /\s*[;|]\s*/ },
'advisor' => { from: ['advisor'], split: /\s*[;|]\s*/ },
'alternative_title' => { from: ['alternative_title'], split: /\s*[;|]\s*/ },
'bibliographic_citation' => { from: ['bibliographic_citation'], split: /\s*[;|]\s*/ },
'children' => { from: ['children'], related_children_field_mapping: true },
'committee_member' => { from: ['committee_member'], split: ';' },
'committee_member' => { from: ['committee_member'], split: /\s*[;|]\s*/ },
'contributor_institutional_relationship' => { from: ['contributor_institutional_relationship'] },
'contributor_orcid' => { from: ['contributor_orcid'] },
'contributor_role' => { from: ['contributor_role'], split: ';' },
'contributor_role' => { from: ['contributor_role'], split: /\s*[;|]\s*/ },
'contributor' => { from: ['contributor'], split: ';' },
'creator_institutional_relationship' => { from: ['creator_institutional_relationship'], split: ';' },
'creator_institutional_relationship' => { from: ['creator_institutional_relationship'], split: /\s*[;|]\s*/ },
'creator_orcid' => { from: ['creator_orcid'] },
'creator' => { from: ['creator'], split: ';' },
'creator' => { from: ['creator'], split: /\s*[;|]\s*/ },
'date_created' => { from: ['date_created'] },
'degree_granting_institution' => { from: ['degree_granting_institution'], split: ';' },
'degree' => { from: ['degree'], split: ';' },
'department' => { from: ['department'], split: ';' },
'description' => { from: ['description'], split: ';' },
'discipline' => { from: ['discipline'], split: ';' },
'event_date' => { from: ['event_date'], split: ';' },
'event_location' => { from: ['event_location'], split: ';' },
'event_title' => { from: ['event_title'], split: ';' },
'degree_granting_institution' => { from: ['degree_granting_institution'], split: /\s*[;|]\s*/ },
'degree' => { from: ['degree'], split: /\s*[;|]\s*/ },
'department' => { from: ['department'], split: /\s*[;|]\s*/ },
'description' => { from: ['description'], split: /\s*[|]\s*/ },
'discipline' => { from: ['discipline'], split: /\s*[;|]\s*/ },
'event_date' => { from: ['event_date'], split: /\s*[;|]\s*/ },
'event_location' => { from: ['event_location'], split: /\s*[;|]\s*/ },
'event_title' => { from: ['event_title'], split: /\s*[;|]\s*/ },
'extent' => { from: ['extent'] },
'format' => { from: ['format'], split: ';' },
'funder_awards' => { from: ['funder_awards'], split: ';' },
'funder_name' => { from: ['funder_name'], split: ';' },
'format' => { from: ['format'], split: /\s*[;|]\s*/ },
'funder_awards' => { from: ['funder_awards'], split: /\s*[;|]\s*/ },
'funder_name' => { from: ['funder_name'], split: /\s*[;|]\s*/ },
'identifier' => { from: ['identifier'] },
'institution' => { from: ['institution'] },
'keyword' => { from: ['keyword'], split: ';' },
'keyword' => { from: ['keyword'], split: /\s*[;|]\s*/ },
'label' => { from: ['label'] },
'language' => { from: ['language'], split: ';' },
'language' => { from: ['language'], split: /\s*[;|]\s*/ },
# 'level' => { from: ['level'] },
'license' => { from: ['license'] },
'official_link' => { from: ['official_link'], split: ';' },
'location' => { from: ['location'], split: /\s*[;|]\s*/ },
'official_link' => { from: ['official_link'], split: /\s*[;|]\s*/ },
'parents' => { from: ['parents'], related_parents_field_mapping: true },
'project_name' => { from: ['project_name'], split: ';' },
'publisher' => { from: ['publisher'], split: ';' },
'related_url' => { from: ['related_url'], split: ';' },
'project_name' => { from: ['project_name'], split: /\s*[;|]\s*/ },
'publisher' => { from: ['publisher'], split: /\s*[;|]\s*/ },
'related_url' => { from: ['related_url'], split: /\s*[;|]\s*/ },
'resource_type' => { from: ['resource_type'] },
'rights_holder' => { from: ['rights_holder'], split: ';' },
'rights_notes' => { from: ['rights_notes'], split: ';' },
'rights_holder' => { from: ['rights_holder'], split: /\s*[;|]\s*/ },
'rights_notes' => { from: ['rights_notes'], split: /\s*[;|]\s*/ },
'rights_statement' => { from: ['rights_statement'] },
'source_identifier' => { from: ['source_identifier'], source_identifier: true },
'source' => { from: ['source'], split: ';' },
'subject' => { from: ['subject'], split: ';' },
'source' => { from: ['source'], split: /\s*[;|]\s*/ },
'subject' => { from: ['subject'], split: /\s*[;|]\s*/ },
'title' => { from: ['title'] },
'types' => { from: ['types'], split: ';' },
'types' => { from: ['types'], split: /\s*[;|]\s*/ },
'video_embed' => { from: ['video_embed'] },
'work_url' => { from: ['work_url'] },
'year' => { from: ['year'] }
Expand Down
15 changes: 7 additions & 8 deletions config/locales/hyrax.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1168,26 +1168,25 @@ de:
based_near: Ein Ortsname, der sich auf das Werk bezieht, z. B. der Veröffentlichungsort oder die Stadt, das Bundesland oder das Land, um das es in dem Arbeitsinhalt geht. Ruft den <a href='http://www.geonames.org'> GeoNames-Webdienst </a> auf.
contributor: Eine Person oder Gruppe, die Sie als eine Rolle bei der Erstellung der Arbeit erkennen möchten, jedoch nicht die primäre Rolle. Personennamen sollten mit dem Nachnamen zuerst eingegeben werden, z.B. „Smith, John“. Geben Sie keine Abschluss- oder anderen beruflichen oder schulischen Qualifikationen, Spitznamen, Abkürzungen oder Titel an.
creator: Die Person oder Gruppe, die für die Arbeit verantwortlich ist. Normalerweise ist dies der Autor des Inhalts. Persönliche Namen sollten mit dem Nachnamen zuerst eingegeben werden, z. "Smith, John". Geben Sie keine Abschluss- oder anderen beruflichen oder schulischen Qualifikationen, Spitznamen, Abkürzungen oder Titel an.
date_created: Das Datum, an dem die Arbeit erstellt wurde.
date_created: Das Datum, an dem die Arbeit erstellt wurde. Deve seguir o formato YYYY, YYYY-MM, or YYYY-MM-DD para ser filtrado e classificado.
description: Ein Freitextkonto der Ressource.
extent: Das Ausmaß (Größe, Dauer, Anzahl, etc.) der Arbeit.
format: Das Dateiformat der digitalen Ressource.
identifier: Ein einzigartiger Griff, der die Arbeit identifiziert. Ein Beispiel wäre ein DOI für einen Zeitschriftenartikel oder eine ISBN- oder OCLC-Nummer für ein Buch.
institution: Wählen Sie den Namen der Institution, die das Repository hostet, auf das Sie diese Arbeit hochladen.
keyword: Wörter oder Sätze, die Sie auswählen, um zu beschreiben, worum es in der Arbeit geht. Dies muss kein kontrolliertes Vokabular sein.
language: Die Sprache des Arbeitsinhalts.
license: Lizenz- und Vertriebsinformationen für den Zugang zum Werk. Wählen Sie aus der bereitgestellten Dropdown-Liste.
language: Die Sprache des Inhalts des Werks. Buchstabieren Sie die Sprache und schreiben Sie den ersten Buchstaben groß.
license: Lizenz- und Vertriebsinformationen, die den Zugang zum Werk regeln. Wählen Sie aus der bereitgestellten Dropdown-Liste aus. Weitere Informationen zu Creative Commons-Lizenzen finden Sie unter <a href="https://creativecommons.org/licenses/">https://creativecommons.org/licenses/</a>.
location: Das für das ursprüngliche Element relevante geografische Thema. <a href='https://fast.oclc.org/searchfast/'>FAST-geografische Begriffe</a> oder ein anderes kontrolliertes Vokabular werden empfohlen.
publisher: Die Person oder Gruppe, die für die Bereitstellung der ursprünglichen Ressource verantwortlich ist.
related_url: Ein Link zu einer Website oder einem anderen spezifischen Inhalt (Audio, Video, PDF-Dokument), der sich auf die Arbeit bezieht. Ein Beispiel ist die URL eines Forschungsprojekts, von dem die Arbeit abgeleitet wurde.
resource_type: Vordefinierte Kategorien zur Beschreibung der Art oder des Genres der Ressource, z. B. B. „Artikel“. oder „Datensatz“. Es kann mehr als ein Typ ausgewählt werden.
rights_notes: Hier können zusätzliche Erläuterungen zu Rechten oder Lizenzen eingefügt werden.
rights_statement: Wählen Sie die entsprechende Rechteerklärung aus der Dropdown-Liste aus. Weitere Informationen finden Sie unter https://rightsstatements.org.
subject: Überschriften oder Indexbegriffe, die beschreiben, worum es in der Arbeit geht Verwenden Sie ein kontrolliertes Vokabular.
title: Ein Name, der bei der Identifizierung eines Werks hilft.
rights_statement: Wählen Sie die entsprechende Rechteerklärung aus der Dropdown-Liste aus. Weitere Informationen finden Sie unter <a href='https://rightsstatements.org'>https://rightsstatements.org</a>.
subject: Betreffzeilen, die beschreiben, worum es in der Arbeit geht. Bitte verwenden Sie ausschließlich <a href='https://fast.oclc.org/searchfast/'>FAST-Betreffüberschriften</a> oder ein anderes kontrolliertes Vokabular.
title: Ein Name, der der Ressource gegeben wird.
types: Vordefinierte Kategorien zur Beschreibung der Art des hochgeladenen Inhalts. Es können mehrere Typen ausgewählt werden.
video_embed: Youtube- oder Vimeo-Iframe-Einbettungscode zum Anzeigen des in die Arbeitsseite eingebetteten Videos. Wenn Sie einen Einbettungslink für ein Video eingeben, muss es sich um eine ordnungsgemäß formatierte URL handeln, die mit „http://“ oder „https://“ beginnt. Es muss außerdem einen gültigen Link zu einem gehosteten Video enthalten, das in einem Iframe angezeigt werden kann. <br /><br /><i>Beispiele:<br/>https://player.vimeo.com/video/467264493?h=b089de0eab<br/>https://www.youtube.com/embed/ Znf73dsFdC8</i>
generic_work:
subject: Überschriften oder Indexbegriffe, die beschreiben, worum es in der Arbeit geht. Verwenden Sie einen kontrollierten Wortschatz.
labels:
extent: Umfang
labels:
Expand Down
Loading

0 comments on commit ff23d62

Please sign in to comment.