From 46da18272501c0aa7a99f0e04638d7e13a862b74 Mon Sep 17 00:00:00 2001 From: Mike Korcynski Date: Wed, 4 Oct 2023 10:12:13 -0400 Subject: [PATCH] wip transcripts for Generic Objects --- Gemfile | 2 +- Gemfile.lock | 4 ++-- app/forms/hyrax/generic_object_form.rb | 2 ++ app/views/hyrax/base/_form_metadata.html.erb | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 6c4272e2..863d35c9 100644 --- a/Gemfile +++ b/Gemfile @@ -22,7 +22,7 @@ gem 'okcomputer' gem 'pdf-reader' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.2' -gem 'rmagick', '4.2.4' +gem 'rmagick', '4.2.6' # Use sqlite3 as the database for Active Record gem 'sqlite3' diff --git a/Gemfile.lock b/Gemfile.lock index 2dbb58d7..842f6e00 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -785,7 +785,7 @@ GEM railties (>= 5.0) retriable (3.1.2) rexml (3.2.5) - rmagick (4.2.4) + rmagick (4.2.6) rsolr (2.5.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) @@ -1026,7 +1026,7 @@ DEPENDENCIES rails (~> 5.2) rails-controller-testing react-rails - rmagick (= 4.2.4) + rmagick (= 4.2.6) rsolr (>= 1.0) rspec-rails rubyzip (>= 1.2.2) diff --git a/app/forms/hyrax/generic_object_form.rb b/app/forms/hyrax/generic_object_form.rb index 07396497..8a78d216 100644 --- a/app/forms/hyrax/generic_object_form.rb +++ b/app/forms/hyrax/generic_object_form.rb @@ -3,7 +3,9 @@ # `rails generate hyrax:work GenericObject` module Hyrax class GenericObjectForm < Hyrax::Forms::WorkForm + include Tufts::HasTranscriptForm self.model_class = ::GenericObject + self.terms += [:transcript_id] self.terms += Tufts::Terms.shared_terms Tufts::Terms.remove_terms.each { |term| terms.delete(term) } self.required_fields = [:title, :displays_in] diff --git a/app/views/hyrax/base/_form_metadata.html.erb b/app/views/hyrax/base/_form_metadata.html.erb index cd3432e9..9426dffc 100644 --- a/app/views/hyrax/base/_form_metadata.html.erb +++ b/app/views/hyrax/base/_form_metadata.html.erb @@ -1,7 +1,7 @@ <%= render 'form_media', f: f %> -<% if @curation_concern.class.to_s == 'Audio' || @curation_concern.class.to_s == 'Video' %> +<% if @curation_concern.class.to_s == 'Audio' || @curation_concern.class.to_s == 'Video' || @curation_concern.class.to_s == 'GenericObject' %>
<%= render_edit_field_partial(:transcript_id, f: f) %>