From e8a511b4a5473e085792e8e731f19fd01cedbf0e Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Wed, 6 Dec 2023 13:40:00 -0800 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=8E=81=20Update=20theme=20show=20page?= =?UTF-8?q?s=20with=20video=20embed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit updates the scholarly theme's show page to handle video embed Issue: - https://github.com/scientist-softserv/palni-palci/issues/911 --- .../scholarly_show/hyrax/base/show.html.erb | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/views/themes/scholarly_show/hyrax/base/show.html.erb b/app/views/themes/scholarly_show/hyrax/base/show.html.erb index 2b3050f09..4a0d4db30 100644 --- a/app/views/themes/scholarly_show/hyrax/base/show.html.erb +++ b/app/views/themes/scholarly_show/hyrax/base/show.html.erb @@ -16,30 +16,32 @@
<%= render 'workflow_actions_widget', presenter: @presenter %> - <% if @presenter.iiif_viewer? %> + <% if @presenter.video_embed_viewer? %> + <%= render 'video_embed_viewer', presenter: @presenter %>
+
+ <% render 'work_description', presenter: @presenter %> +
+
+ <% elsif @presenter.iiif_viewer? %> +
<%= render 'representative_media', presenter: @presenter, viewer: true %>
- <%= render 'work_description', presenter: @presenter %> + <% render 'work_description', presenter: @presenter %>
- <% elsif Flipflop.default_pdf_viewer? && @presenter.show_pdf_viewer? && @presenter.file_set_presenters.any?(&:pdf?) %> + <% elsif @presenter.pdf_viewer? %>
<%= render 'pdf_js', file_set_presenter: pdf_file_set_presenter(@presenter) %>
-
-
- <%= render 'work_description', presenter: @presenter %> -
-
<% else %>
- <%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.iiif_viewer? && @presenter.file_set_presenters.any?(&:pdf?) %> + <%= render 'representative_media', presenter: @presenter, viewer: false %>
- <%= render 'work_description', presenter: @presenter %> + <% render 'work_description', presenter: @presenter %>
<% end %>
From 9ac04da4dc99c1fbe5027f9d6869894ba1ff125e Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Wed, 6 Dec 2023 13:47:50 -0800 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=8E=81=20add=20video=20embed=20to=20r?= =?UTF-8?q?eshare=20theme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../themes/reshare_show/hyrax/base/show.html.erb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/themes/reshare_show/hyrax/base/show.html.erb b/app/views/themes/reshare_show/hyrax/base/show.html.erb index 9d4938dc9..8dc99c03c 100644 --- a/app/views/themes/reshare_show/hyrax/base/show.html.erb +++ b/app/views/themes/reshare_show/hyrax/base/show.html.erb @@ -7,7 +7,9 @@
<%= render 'workflow_actions_widget', presenter: @presenter %> - <% if @presenter.iiif_viewer? %> + <% if @presenter.video_embed_viewer? %> + <%= render 'video_embed_viewer', presenter: @presenter %> + <% elsif @presenter.iiif_viewer? %>
<%= render 'representative_media', presenter: @presenter, viewer: true %>
@@ -15,10 +17,11 @@
<%= render 'pdf_js', file_set_presenter: pdf_file_set_presenter(@presenter) %>
+ <% else %> +
+ <%= render 'representative_media', presenter: @presenter, viewer: false %> +
<% end %> -
- <%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.universal_viewer? || @presenter.show_pdf_viewer? %> -
From 628981cbd888b64a0d94fefbde33496a0438e071 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Wed, 6 Dec 2023 13:56:26 -0800 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=8E=81=20add=20video=20embed=20to=20c?= =?UTF-8?q?ultural=20theme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cultural_show/hyrax/base/show.html.erb | 68 +++++++------------ 1 file changed, 26 insertions(+), 42 deletions(-) diff --git a/app/views/themes/cultural_show/hyrax/base/show.html.erb b/app/views/themes/cultural_show/hyrax/base/show.html.erb index 95f79ad99..83c869d5d 100644 --- a/app/views/themes/cultural_show/hyrax/base/show.html.erb +++ b/app/views/themes/cultural_show/hyrax/base/show.html.erb @@ -11,64 +11,48 @@
<%= 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 %> -
-
+ <% if @presenter.video_embed_viewer? %> + <%= render 'video_embed_viewer', presenter: @presenter %> + <% else %> + <% if @presenter.iiif_viewer? %> +
+ <%= render 'representative_media', presenter: @presenter, viewer: true %> +
+ <% elsif @presenter.pdf_viewer? %> +
+ <%= render 'pdf_js', file_set_presenter: pdf_file_set_presenter(@presenter) %> +
+ <% else %> +
+ <%= render 'representative_media', presenter: @presenter, viewer: false %> +
+ <% end %> <% 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('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 %>
+ + <% @presenter.member_of_collection_ids.each do |collection_id| %> + + <% end %>
- - <% @presenter.member_of_collection_ids.each do |collection_id| %> - - <% end %>
-
+
\ No newline at end of file