diff --git a/app/controllers/hyrax/dashboard/collections_controller_decorator.rb b/app/controllers/hyrax/dashboard/collections_controller_decorator.rb index 8424eceb0..674974a84 100644 --- a/app/controllers/hyrax/dashboard/collections_controller_decorator.rb +++ b/app/controllers/hyrax/dashboard/collections_controller_decorator.rb @@ -28,10 +28,12 @@ def update_valkyrie_collection result = transactions['change_set.update_collection'] .with_step_args( 'collection_resource.save_collection_banner' => { update_banner_file_ids: params["banner_files"], - alttext: params["banner_text"]&.first }, + alttext: params["banner_text"]&.first, + banner_unchanged_indicator: params["banner_unchanged"] }, 'collection_resource.save_collection_logo' => { update_logo_file_ids: params["logo_files"], alttext_values: params["alttext"], - linkurl_values: params["linkurl"] }, + linkurl_values: params["linkurl"], + logo_unchanged_indicator: false }, 'collection_resource.save_collection_thumbnail' => { update_thumbnail_file_ids: params["thumbnail_files"], thumbnail_unchanged_indicator: params["thumbnail_unchanged"], alttext_values: params["thumbnail_text"] } diff --git a/app/presenters/hyrax/presenter_renderer_decorator.rb b/app/presenters/hyrax/presenter_renderer_decorator.rb new file mode 100644 index 000000000..58e974b05 --- /dev/null +++ b/app/presenters/hyrax/presenter_renderer_decorator.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# OVERRIDE Hyrax 5 to display based near label instead of URI +# @TODO Move this behavior into Hyrax in a flexible manner +module Hyrax + module PresenterRendererDecorator + def value(field_name, locals = {}) + field_name == :based_near ? super(:based_near_label, locals) : super(field_name, locals) + end + end +end + +Hyrax::PresenterRenderer.prepend(Hyrax::PresenterRendererDecorator) diff --git a/app/views/hyrax/oers/_attribute_rows.html.erb b/app/views/hyrax/oers/_attribute_rows.html.erb index b86c23b7a..eea43464c 100644 --- a/app/views/hyrax/oers/_attribute_rows.html.erb +++ b/app/views/hyrax/oers/_attribute_rows.html.erb @@ -12,6 +12,7 @@ <%= presenter.attribute_to_html(:date_created, html_dl: true) %> <%= presenter.attribute_to_html(:table_of_contents, html_dl: true) %> <%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> +<%= presenter.attribute_to_html(:based_near_label, html_dl: true) %> <%= presenter.attribute_to_html(:rights_statement, render_as: :rights_statement, html_dl: true) %> <%= presenter.attribute_to_html(:license, render_as: :license, html_dl: true) %> <%= presenter.attribute_to_html(:rights_holder, render_as: :linked, html_dl: true) %> diff --git a/app/views/themes/cultural_show/hyrax/oers/_related_item.html.erb b/app/views/themes/cultural_show/hyrax/oers/_related_item.html.erb new file mode 100644 index 000000000..d2307a7df --- /dev/null +++ b/app/views/themes/cultural_show/hyrax/oers/_related_item.html.erb @@ -0,0 +1,4 @@ + + <%= "#{relationship.titlecase}" %>: + <%= link_to(member.link_name, contextual_path(member, @presenter)) %> + \ No newline at end of file diff --git a/app/views/themes/cultural_show/hyrax/oers/show.html.erb b/app/views/themes/cultural_show/hyrax/oers/show.html.erb new file mode 100644 index 000000000..9a20b320f --- /dev/null +++ b/app/views/themes/cultural_show/hyrax/oers/show.html.erb @@ -0,0 +1,74 @@ +<% content_for(:extra_body_classes, 'works-show text-show-theme-partial ') %> +<% provide :page_title, @presenter.page_title %> +<%= render 'shared/citations' %> +<%= render './shared/additional_citations' %> +
+
+
+
+ <%= render 'work_title', presenter: @presenter %> +
+
+
+ <%= render 'workflow_actions_widget', presenter: @presenter %> + <% if @presenter.iiif_viewer? %> +
+ <%= render 'representative_media', presenter: @presenter, viewer: true %> +
+ <% elsif Flipflop.default_pdf_viewer? && @presenter.show_pdf_viewer? && @presenter.file_set_presenters.any?(&:pdf?) %> +
+ <%= render 'pdf_js', file_set_presenter: pdf_file_set_presenter(@presenter) %> +
+ <% end %> +
+ <%= render "show_actions", presenter: @presenter %> +
+
+ <%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.iiif_viewer? || @presenter.show_pdf_viewer? %> + <% if !@presenter.iiif_viewer? %> +
+
+ <%= render('download_pdf', presenter: @presenter, file_set_id: @presenter.file_set_presenters.first.id) if @presenter.show_pdf_download_button? %> + <%= render 'citations', presenter: @presenter %> + + <%#= render 'analytics_button', presenter: @presenter %> +
+
+ <% end %> +
+
+ <%= render 'work_description', presenter: @presenter %> + <%= render 'metadata', presenter: @presenter %> +
+
+
+ <%= render 'relationships', presenter: @presenter %> +
+ <% if @presenter.class == Hyrax::OerPresenter %> +
+ <%= render 'related_items', presenter: @presenter %> +
+ <% end %> + <% if @presenter.iiif_viewer? %> +
+
+ <%= render('download_pdf', presenter: @presenter, file_set_id: @presenter.file_set_presenters.first.id) if @presenter.show_pdf_download_button? %> + <%= render 'citations', presenter: @presenter %> + + <%#= render 'analytics_button', presenter: @presenter %> +
+
+ <% end %> +
+
+
+ <%= render 'items', presenter: @presenter %> + <%# TODO: we may consider adding these partials in the future %> + <%# = render 'sharing_with', presenter: @presenter %> + <%# = render 'user_activity', presenter: @presenter %> +
+
+
+
+
+ diff --git a/app/views/themes/neutral_repository/hyrax/homepage/_recent_document.html.erb b/app/views/themes/neutral_repository/hyrax/homepage/_recent_document.html.erb index c8ca85c2f..8555b3c3d 100644 --- a/app/views/themes/neutral_repository/hyrax/homepage/_recent_document.html.erb +++ b/app/views/themes/neutral_repository/hyrax/homepage/_recent_document.html.erb @@ -1,3 +1,4 @@ +<%# OVERRIDE Hyrax v5.0.0rc2 template for client theming and shared search %>

<%= t('hyrax.homepage.recently_uploaded.document.title_label') %>

<%= link_to(generate_work_url(recent_document, request)) do %> diff --git a/config/authorities/discipline.yml b/config/authorities/discipline.yml index 6ddbacade..c12c1f0ef 100644 --- a/config/authorities/discipline.yml +++ b/config/authorities/discipline.yml @@ -127,3 +127,5 @@ terms: term: Engineering - Industrial - id: Law term: Law + - id: Other + term: Other diff --git a/spec/services/hyrax/discipline_service_spec.rb b/spec/services/hyrax/discipline_service_spec.rb index 43be77e75..ddf2312cd 100644 --- a/spec/services/hyrax/discipline_service_spec.rb +++ b/spec/services/hyrax/discipline_service_spec.rb @@ -5,7 +5,7 @@ it "has a select list" do expect(subject.first).to eq ["Languages - Spanish", "Languages - Spanish"] - expect(subject.size).to eq 64 + expect(subject.size).to eq 65 end end