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

Commit 1fc302b

Browse files
committed
Merge pull request #154 from ualbertalib/fix-new-form
minor modification to add missing citation field and dataset as a resource type
2 parents 7fa81b4 + d8c50cc commit 1fc302b

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

app/presenters/hydranorth/generic_file_presenter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class GenericFilePresenter
33
include Hydra::Presenter
44
self.model_class = ::GenericFile
55
# Terms is the list of fields displayed by app/views/generic_files/_show_descriptions.html.erb
6-
self.terms = [:resource_type, :title, :creator, :contributor, :description, :date_created, :license, :subject, :spatial, :temporal, :source, :related_url, :language]
6+
self.terms = [:resource_type, :title, :creator, :contributor, :description, :date_created, :license, :subject, :spatial, :temporal, :is_version_of, :source, :related_url, :language]
77

88
# Depositor and permissions are not displayed in app/views/generic_files/_show_descriptions.html.erb
99
# so don't include them in `terms'.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<% if f.object.class.multiple? key %>
2+
<%= f.input :is_version_of, as: :multi_value_with_help, input_html: { rows: '5', type: 'textarea'}, required: false %>
3+
<% else %>
4+
<%= f.input :is_version_of, as: :single_text_with_help, input_html: { rows: '5', type: 'textarea' } %>
5+
<% end %>
6+

config/initializers/sufia.rb

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"Book Chapter" => "Book Chapter",
3333
"Conference\/Workshop Poster" => "Conference\/Workshop Poster",
3434
"Conference\/Workshop Presentation" => "Conference\/Workshop Presentation",
35+
"Dataset" => "Dataset",
3536
"Image" => "Image",
3637
"Journal Article (Draft-Submitted)" => "Journal Article (Draft-Submitted)",
3738
"Journal Article (Published)" => "Journal Article (Published)",
@@ -46,6 +47,7 @@
4647
"Book Chapter" => "http://schema.org/Book",
4748
"Conference\/Workshop Poster" => "http://schema.org/CreativeWork",
4849
"Conference\/Workshop Presentation" => "http://schema.org/CreativeWork",
50+
"Dataset" => "http://schema.org/Dataset",
4951
"Image" => "http://schema.org/ImageObject",
5052
"Journal Article (Draft-Submitted)" => "http://schema.org/Article",
5153
"Journal Article (Published)" => "http://schema.org/Article",

config/locales/sufia.en.yml

+1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ en:
172172
related_url: "Link to related item"
173173
temporal: "Is this item about a time?"
174174
spatial: "Is this item about a place?"
175+
is_version_of: "Citation for previous publication"
175176
source: "Source"
176177
collection:
177178
description: "Abstract or Summary"

0 commit comments

Comments
 (0)