Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

minor modification to add missing citation field and dataset as a resource type #154

Merged
merged 3 commits into from
Mar 28, 2015
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/presenters/hydranorth/generic_file_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down
6 changes: 6 additions & 0 deletions app/views/records/edit_fields/_is_version_of.html.erb
Original file line number Diff line number Diff line change
@@ -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 %>

2 changes: 2 additions & 0 deletions config/initializers/sufia.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions config/locales/sufia.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down