-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updates Bulkrax - Add documentation to work_show_presenter - Update representative_media bootstrap classes - Update _relationships partial to coordinate with current Hyrax - Update some obsolete code in image_show/show.html.erb
- Loading branch information
Showing
6 changed files
with
66 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,10 @@ | ||
<%# OVERRIDE Hyrax 2.9 to make relationships only show if they exist %> | ||
<% if !current_user && presenter.grouped_presenters.present? %> | ||
<%# Collection %> | ||
<div class="work-show"> | ||
<h2><%= t('hyrax.base.show.relationships') %></h2> | ||
<%= render 'relationships_parent_rows', presenter: presenter %> | ||
</div> | ||
<% end %> | ||
<% if current_user %> | ||
<div class="work-show"> | ||
<h2><%= t('hyrax.base.show.relationships') %></h2> | ||
<%# Admin Set %> | ||
<%= presenter.attribute_to_html(:admin_set, render_as: :faceted, html_dl: true) %> | ||
<%# Collection %> | ||
<% presenter.grouped_presenters(except: presenter.presenter_types).each_pair do |model_name, items| %> | ||
<%= render 'relationships_parent_row', type: model_name, items: items, presenter: presenter %> | ||
<% end %> | ||
<%# Render grouped presenters. Show rows if there are any items of that type %> | ||
<% presenter.presenter_types.each do |type| %> | ||
<% presenter.grouped_presenters(filtered_by: type).each_pair do |_, items| %> | ||
<%= render 'relationships_parent_row', type: type, items: items, presenter: presenter %> | ||
<% end %> | ||
<% end %> | ||
<%# OVERRIDE Hyrax 6 to include parent works %> | ||
<dl class="work-show"> | ||
<%= render 'relationships_parent_rows', presenter: presenter %> | ||
</dl> | ||
|
||
<%# Parent Work %> | ||
<%# Render a link back to its parent works %> | ||
<% if presenter.parent_works(current_user).present? %> | ||
<%= render 'relationships_parent_works_rows', presenter: presenter %> | ||
<% end %> | ||
</div> | ||
<% else %> | ||
<%# Parent Work %> | ||
<%# Render a link back to its parent works %> | ||
<% if presenter.parent_works(current_user).present? %> | ||
<%= render 'relationships_parent_works_rows', presenter: presenter %> | ||
<% end %> | ||
<%# Parent Work %> | ||
<%# Render a link back to its parent works %> | ||
<% if presenter.parent_works(current_user).present? %> | ||
<%= render 'relationships_parent_works_rows', presenter: presenter %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
<% if presenter.representative_id.present? && presenter.representative_presenter.present? %> | ||
<%# logic to determine which viewer appears is defined in: %> | ||
<%# pdf_js_helper, work_show_presenter, and tenant_config %> | ||
<% if defined?(viewer) && viewer && presenter.iiif_viewer?%> | ||
<%= iiif_viewer_display presenter %> | ||
<% elsif Flipflop.default_pdf_viewer? && presenter.show_pdf_viewer? && presenter.file_set_presenters.any?(&:pdf?) %> | ||
<%= render 'pdf_js', file_set_presenter: presenter.file_set_presenters.first %> | ||
<div class="center-block"> | ||
<%= iiif_viewer_display presenter %> | ||
</div> | ||
<% elsif presenter.show_pdf_viewer? %> | ||
<div class="center-block"> | ||
<%= render 'pdf_js', file_set_presenter: presenter.file_set_presenters.first %> | ||
</div> | ||
<% else %> | ||
<%= render media_display_partial(presenter.representative_presenter), file_set: presenter.representative_presenter %> | ||
<div class="center-block"> | ||
<%= render media_display_partial(presenter.representative_presenter), file_set: presenter.representative_presenter %> | ||
</div> | ||
<% end %> | ||
<% else %> | ||
<% alt = block_for(name: 'default_work_image_text') || 'Default work thumbnail' %> | ||
<%= image_tag default_work_image, class: "canonical-image", alt: alt %> | ||
<%= image_tag default_work_image, class: "canonical-image center-block", alt: alt %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters