diff --git a/app/presenters/hydranorth/generic_file_presenter.rb b/app/presenters/hydranorth/generic_file_presenter.rb index 10711776..95607b9e 100644 --- a/app/presenters/hydranorth/generic_file_presenter.rb +++ b/app/presenters/hydranorth/generic_file_presenter.rb @@ -3,7 +3,7 @@ class GenericFilePresenter include Hydra::Presenter self.model_class = ::GenericFile # Terms is the list of fields displayed by app/views/generic_files/_show_descriptions.html.erb - self.terms = [:resource_type, :title, :creator, :contributor, :description, :date_created, :license, :subject, :spatial, :temporal, :source, :related_url, :language] + self.terms = [:resource_type, :title, :creator, :contributor, :description, :date_created, :license, :subject, :spatial, :temporal, :is_version_of, :source, :related_url, :language] # Depositor and permissions are not displayed in app/views/generic_files/_show_descriptions.html.erb # so don't include them in `terms'. diff --git a/app/views/records/edit_fields/_is_version_of.html.erb b/app/views/records/edit_fields/_is_version_of.html.erb new file mode 100644 index 00000000..01929587 --- /dev/null +++ b/app/views/records/edit_fields/_is_version_of.html.erb @@ -0,0 +1,6 @@ +<% if f.object.class.multiple? key %> + <%= f.input :is_version_of, as: :multi_value_with_help, input_html: { rows: '5', type: 'textarea'}, required: false %> +<% else %> + <%= f.input :is_version_of, as: :single_text_with_help, input_html: { rows: '5', type: 'textarea' } %> +<% end %> + diff --git a/config/initializers/sufia.rb b/config/initializers/sufia.rb index 29c69bf7..0739bbca 100755 --- a/config/initializers/sufia.rb +++ b/config/initializers/sufia.rb @@ -32,6 +32,7 @@ "Book Chapter" => "Book Chapter", "Conference\/Workshop Poster" => "Conference\/Workshop Poster", "Conference\/Workshop Presentation" => "Conference\/Workshop Presentation", + "Dataset" => "Dataset", "Image" => "Image", "Journal Article (Draft-Submitted)" => "Journal Article (Draft-Submitted)", "Journal Article (Published)" => "Journal Article (Published)", @@ -46,6 +47,7 @@ "Book Chapter" => "http://schema.org/Book", "Conference\/Workshop Poster" => "http://schema.org/CreativeWork", "Conference\/Workshop Presentation" => "http://schema.org/CreativeWork", + "Dataset" => "http://schema.org/Dataset", "Image" => "http://schema.org/ImageObject", "Journal Article (Draft-Submitted)" => "http://schema.org/Article", "Journal Article (Published)" => "http://schema.org/Article", diff --git a/config/locales/sufia.en.yml b/config/locales/sufia.en.yml index d1d768b1..8e0327d9 100644 --- a/config/locales/sufia.en.yml +++ b/config/locales/sufia.en.yml @@ -172,6 +172,7 @@ en: related_url: "Link to related item" temporal: "Is this item about a time?" spatial: "Is this item about a place?" + is_version_of: "Citation for previous publication" source: "Source" collection: description: "Abstract or Summary"