Skip to content

Commit

Permalink
Update show.html.erb
Browse files Browse the repository at this point in the history
  • Loading branch information
Shana Moore committed Dec 6, 2023
1 parent fc720d8 commit d0fc820
Showing 1 changed file with 26 additions and 44 deletions.
70 changes: 26 additions & 44 deletions app/views/themes/cultural_show/hyrax/base/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,66 +11,48 @@
<div class="panel-body">
<div class="row">
<%= render 'workflow_actions_widget', presenter: @presenter %>
<% if @presenter.video_embed_viewer? %>
<%= render 'video_embed_viewer', presenter: @presenter %>
<% elsif @presenter.iiif_viewer? %>
<div class="col-sm-12 centered-media">
<%= render 'representative_media', presenter: @presenter, viewer: true %>
</div>
<% elsif @presenter.show_pdf_viewer? %>
<div class="col-sm-12">
<%= render 'pdf_js', file_set_presenter: pdf_file_set_presenter(@presenter) %>
</div>
<% end %>
<div class="col-sm-12">
<%= render "show_actions", presenter: @presenter %>
</div>
<div class="centered-media <%= !@presenter.iiif_viewer? ? 'col-sm-6 text-center' : '' %>">
<%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.iiif_viewer? || @presenter.show_pdf_viewer? %>
<% if !@presenter.iiif_viewer? %>
<div>
<br/>
<%= render('download_pdf', presenter: @presenter, file_set_id: @presenter.file_set_presenters.first.id) if @presenter.show_pdf_download_button? %>
<%= render 'citations', presenter: @presenter %>
<!-- analytics_button is disabled until future fix -->
<%#= render 'analytics_button', presenter: @presenter %>
<br/>
</div>
<% if @presenter.video_embed_viewer? %>
<%= render 'video_embed_viewer', presenter: @presenter %>
<% else %>
<% if @presenter.iiif_viewer? %>
<div class="col-sm-12 centered-media">
<%= render 'representative_media', presenter: @presenter, viewer: true %>
</div>
<% elsif @presenter.pdf_viewer? %>
<div class="col-sm-12">
<%= render 'pdf_js', file_set_presenter: pdf_file_set_presenter(@presenter) %>
</div>
<% else %>
<div class="centered-media <%= !@presenter.viewer? ? 'col-sm-6 text-center' : '' %>">
<%= render 'representative_media', presenter: @presenter, viewer: false %>
</div>
<% end %>
<% end %>
</div>
<div class="<%= @presenter.iiif_viewer? ? 'col-sm-8' : 'col-sm-6' %>">
<div class="<%= @presenter.viewer? ? 'col-sm-8' : 'col-sm-8' %>">
<%= render 'work_description', presenter: @presenter %>
<%= render 'metadata', presenter: @presenter %>
</div>
<div class="<%= @presenter.iiif_viewer? ? 'col-sm-4' : 'col-sm-12' %> relationships-container">
<div class="col-sm-12 col-md-4 relationships-container">
<div class='relationships-box'>
<%= render 'relationships', presenter: @presenter %>
<% if @presenter.class == Hyrax::OerPresenter %>
<%= render 'related_items', presenter: @presenter %>
<% end %>
</div>
<% if @presenter.iiif_viewer? %>
<div class="center-block">
<br>
<%= render('download_pdf', presenter: @presenter, file_set_id: @presenter.file_set_presenters.first.id) if @presenter.show_pdf_download_button? %>
<%= render 'citations', presenter: @presenter %>
<!-- analytics_button is disabled until future fix -->
<%= render('download_pdf', presenter: @presenter, file_set_id: @presenter.file_set_presenters.first.id) if @presenter.show_pdf_download_button? %>
<%= render 'citations', presenter: @presenter %>
<!-- analytics_button is disabled until future fix -->
<%#= render 'analytics_button', presenter: @presenter %>
</div>
<% end %>
</div>
<div class="col-sm-12 work-show-items">
<%= render 'items', presenter: @presenter %>
<%# TODO: we may consider adding these partials in the future %>
<%# = render 'sharing_with', presenter: @presenter %>
<%# = render 'user_activity', presenter: @presenter %>
</div>
<span class='hide analytics-event' data-category="work" data-action="work-view" data-name="<%= @presenter.id %>" >
<% @presenter.member_of_collection_ids.each do |collection_id| %>
<span class='hide analytics-event' data-category="work-in-collection" data-action="work-in-collection-view" data-name="<%= collection_id %>" >
<% end %>
</div>
</div>
</div>
<span class='hide analytics-event' data-category="work" data-action="work-view" data-name="<%= @presenter.id %>" >
<% @presenter.member_of_collection_ids.each do |collection_id| %>
<span class='hide analytics-event' data-category="work-in-collection" data-action="work-in-collection-view" data-name="<%= collection_id %>" >
<% end %>
</div>
</div>
</div>

0 comments on commit d0fc820

Please sign in to comment.