Skip to content

Commit

Permalink
editing date field, predicate is now verbatimEventDate and label is '…
Browse files Browse the repository at this point in the history
…EDTF Date'
  • Loading branch information
jenlindner committed Jan 3, 2018
1 parent 929e7f3 commit 8598f9e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/models/schemas/core_metadata.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module Schemas
class CoreMetadata < ActiveTriples::Schema
property :date, predicate: RDF::Vocab::DC11.date
property :date, predicate: RDF::Vocab::DWC.verbatimEventDate
property :date_label, predicate: RDF::Vocab::DWC.verbatimEventDate
property :keyword, predicate: RDF::Vocab::SCHEMA.keywords
property :rights_note, predicate: RDF::Vocab::DC11.rights
Expand Down
3 changes: 3 additions & 0 deletions config/locales/hyrax.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ en:
based_near_tesim: Location
contributor_tesim: Contributor
creator_tesim: Creator
date: EDTF Date
date_created_tesim: Date Created
date_modified_dtsi: Date Modified
date_uploaded_dtsi: Date Uploaded
Expand All @@ -34,6 +35,7 @@ en:
based_near_tesim: Location
contributor_tesim: Contributor
creator_tesim: Creator
date: EDTF Date
date_created_tesim: Date Created
date_modified_dtsi: Date Modified
date_uploaded_dtsi: Date Uploaded
Expand All @@ -59,6 +61,7 @@ en:
orcid_id: ORCID
rights_statement: Rights
description: Description
date: EDTF Date
hyrax:
product_name: "OHSU Scholar Archive"
product_twitter_handle:
Expand Down
1 change: 0 additions & 1 deletion spec/features/edit_etd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
fill_in 'Description', with: etd[:description].first
# term for license URI set in factory
select('Creative Commons BY-SA Attribution-ShareAlike 4.0 International', from: 'License')
fill_in 'Publisher', with: etd[:publisher].first
fill_in 'Date Created', with: etd[:date_created].first
fill_in 'Subject', with: etd[:subject].first
fill_in 'Language', with: etd[:language].first
Expand Down
2 changes: 1 addition & 1 deletion spec/support/shared_examples/core_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
RSpec.shared_examples 'a model with ohsu core metadata' do
subject(:model) { described_class.new }

it { is_expected.to have_editable_property(:date, RDF::Vocab::DC11.date) }
it { is_expected.to have_editable_property(:date, RDF::Vocab::DWC.verbatimEventDate) }
it { is_expected.to have_editable_property(:date_label, RDF::Vocab::DWC.verbatimEventDate) }
it { is_expected.to have_editable_property(:description, RDF::Vocab::DC11.description) }
it { is_expected.to have_editable_property(:keyword, RDF::Vocab::SCHEMA.keywords) }
Expand Down
2 changes: 1 addition & 1 deletion spec/views/hyrax/base/_form_metadata.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
expect(page)
.to have_multivalued_field(:date)
.on_model(work.class)
.with_label 'Date'
.with_label 'EDTF Date'
end

it 'has date labels' do
Expand Down
2 changes: 1 addition & 1 deletion spec/views/hyrax/base/_metadata.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
it { is_expected.to have_show_field(:creator).with_values(*work.creator).and_label('Creator') }
# underspecify date values (they aren't necessarily sensible for all Date/DateTime values)
it { is_expected.to have_show_field(:date_created).with_label('Date created') }
it { is_expected.to have_show_field(:date).with_values(*work.date).and_label('Date') }
it { is_expected.to have_show_field(:date).with_values(*work.date).and_label('EDTF Date') }
it { is_expected.to have_show_field(:date_label).with_values(*work.date_label).and_label('Date label') }
it { is_expected.to have_show_field(:degree).with_values(*work.degree).and_label('Degree Name') }
it { is_expected.to have_show_field(:department).with_values(*work.department).and_label('Department') }
Expand Down

0 comments on commit 8598f9e

Please sign in to comment.