-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Story To make future upgrades easier, this work attempts to remove unnecessary views, and document the purpose of the overrides for views which are needed. Refs #798 # Expected Behavior Before Changes # Expected Behavior After Changes No behavior changes are expected. # Screenshots / Video <details> <summary></summary> </details> # Notes
- Loading branch information
Showing
15 changed files
with
101 additions
and
175 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,5 @@ on: | |
|
||
jobs: | ||
deploy: | ||
uses: scientist-softserv/actions/.github/workflows/[email protected].15 | ||
uses: scientist-softserv/actions/.github/workflows/[email protected].23 | ||
secrets: inherit |
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
2 changes: 2 additions & 0 deletions
2
app/views/hyrax/admin/appearances/_default_colors_form.html.erb
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 was deleted.
Oops, something went wrong.
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,5 +1,7 @@ | ||
<%# OVERRIDE Hyrax 2.9.5 to add css classes %> | ||
<%# OVERRIDE Hyrax 5 css classes %> | ||
|
||
<dl class="work-show metadata-block <%= dom_class(presenter) %>" <%= presenter.microdata_type_to_html %>> | ||
<%= render 'attribute_rows', presenter: presenter %> | ||
</dl> | ||
<%= presenter.attribute_to_html(:embargo_release_date, render_as: :date, html_dl: true) %> | ||
<%= presenter.attribute_to_html(:lease_expiration_date, render_as: :date, html_dl: true) %> | ||
</dl> |
This file was deleted.
Oops, something went wrong.
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,19 +1,20 @@ | ||
<%# OVERRIDE IiifPrint to add bootstrap classes %> | ||
<%# OVERRIDE Hyku 6.0 to add bootstrap classes %> | ||
|
||
<% if presenter.video_embed_viewer? %> | ||
<div class="center-block"> | ||
<%= video_embed_viewer_display presenter %> | ||
</div> | ||
<% elsif presenter.iiif_viewer? %> | ||
<% if defined?(viewer) && viewer %> | ||
<% if presenter.representative_id.present? && presenter.representative_presenter.present? %> | ||
<% if defined?(viewer) && viewer && presenter.iiif_viewer?%> | ||
<div class="center-block"> | ||
<%= iiif_viewer_display presenter %> | ||
</div> | ||
<% elsif Flipflop.default_pdf_viewer? && presenter.show_pdf_viewer? && presenter.file_set_presenters.any?(&:pdf?) %> | ||
<div class="center-block"> | ||
<%= render 'pdf_js', file_set_presenter: presenter.file_set_presenters.first %> | ||
</div> | ||
<% else %> | ||
<div class="center-block"> | ||
<%= render media_display_partial(presenter.representative_presenter), file_set: presenter.representative_presenter %> | ||
</div> | ||
<% end %> | ||
<% else %> | ||
<%= image_tag 'default.png', class: "canonical-image center-block", alt: 'default representative image' %> | ||
<% alt = block_for(name: 'default_work_image_text') || 'Default work thumbnail' %> | ||
<%= 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,53 @@ | ||
<%# OVERRIDE Hyrax 2.9.1 and 2 parts from the main branch as of 7/14/2021 . There was a bug for 2.9.1-2.9.5 that caused the feature/unfeature buttons to show up on the work-show page for editors when they should not. This has since been fixed in hyrax but this override fixes it for ADL. %> | ||
|
||
<%# OVERRIDE Hyku 6.0 to customize layout %> | ||
<div class="show-actions"> | ||
<% if !workflow_restriction?(presenter) %> | ||
<% if presenter.show_deposit_for?(collections: @user_collections) %> | ||
<input type="checkbox" aria-label="Batch Documents" style="display:none" name="batch_document_ids[]" id="batch_document_<%= presenter.id %>" value="<%= presenter.id %>" class="batch_document_selector" checked="checked" /> | ||
<%= button_tag t('hyrax.dashboard.my.action.add_to_collection'), | ||
class: 'btn btn-default submits-batches submits-batches-add', | ||
data: { toggle: "modal", target: "#collection-list-container" } %> | ||
<% end %> | ||
<% if presenter.work_featurable? %> | ||
<%= link_to t('.feature'), hyrax.featured_work_path(presenter, format: :json), | ||
data: { behavior: 'feature' }, | ||
class: presenter.display_feature_link? ? 'btn btn-default' : 'btn btn-default collapse' %> | ||
|
||
<%= link_to t('.unfeature'), hyrax.featured_work_path(presenter, format: :json), | ||
data: { behavior: 'unfeature' }, | ||
class: presenter.display_unfeature_link? ? 'btn btn-default' : 'btn btn-default collapse' %> | ||
<% end %> | ||
<% end %> | ||
<% if Hyrax.config.analytics? %> | ||
<%= link_to "Analytics", presenter.stats_path, id: 'stats', class: 'btn btn-default' %> | ||
<% # turbolinks needs to be turned off or the page will use the cache and the %> | ||
<% # analytics graph will not show unless the page is refreshed. %> | ||
<%= link_to t('.analytics'), presenter.stats_path, id: 'stats', class: 'btn btn-default', data: { turbolinks: false } %> | ||
<% end %> | ||
<% if presenter.editor? %> | ||
<%= link_to "Edit", edit_polymorphic_path([main_app, presenter]), class: 'btn btn-default' %> | ||
<%= link_to "Delete", [main_app, presenter], class: 'btn btn-danger', data: { confirm: "Delete this #{presenter.human_readable_type}?" }, method: :delete %> | ||
<% if presenter.member_presenters.size > 1 %> | ||
<%= link_to t("hyrax.file_manager.link_text"), polymorphic_path([main_app, :file_manager, presenter]), class: 'btn btn-default' %> | ||
<% end %> | ||
<%# OVERRIDE lines 14-26 from hyrax main branch 7/14/2021 %> | ||
<% if presenter.valid_child_concerns.length > 0 %> | ||
<% if presenter.editor? && !workflow_restriction?(presenter) %> | ||
<%= link_to t('.edit'), edit_polymorphic_path([main_app, presenter]), class: 'btn btn-default', data: { turbolinks: block_valkyrie_redirect? } %> | ||
<% if presenter.member_count > 1 %> | ||
<%= link_to t("hyrax.file_manager.link_text"), polymorphic_path([main_app, :file_manager, presenter]), class: 'btn btn-default' %> | ||
<% end %> | ||
<% if presenter.valid_child_concerns.length > 0 %> | ||
<div class="btn-group"> | ||
<button type="button" class="btn btn-default dropdown-toggle" type="button" id="dropdown-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
<%= t('.attach_child') %> <span class="caret"></span></button> | ||
<ul class="dropdown-menu"> | ||
<% presenter.valid_child_concerns.each do |concern| %> | ||
<li> | ||
<%= link_to "Attach #{concern.human_readable_type}", polymorphic_path([main_app, :new, :hyrax, :parent, concern.model_name.singular.to_sym], parent_id: presenter.id) %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
<%= t('.attach_child') %> | ||
</button> | ||
<div class="dropdown-menu"> | ||
<% presenter.valid_child_concerns.each do |concern| %> | ||
<%= link_to "Attach #{concern.human_readable_type}", polymorphic_path([main_app, :new, :hyrax, :parent, concern.model_name.singular.to_sym], parent_id: presenter.id), class: "dropdown-item" %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
<% if presenter.show_deposit_for?(collections: @user_collections) %> | ||
<input type="checkbox" style="display:none" name="batch_document_ids[]" id="batch_document_<%= presenter.id %>" value="<%= presenter.id %>" class="batch_document_selector" checked="checked" /> | ||
<%= button_tag t('hyrax.dashboard.my.action.add_to_collection'), | ||
class: 'btn btn-default submits-batches submits-batches-add', | ||
data: { toggle: "modal", target: "#collection-list-container" } %> | ||
<% end %> | ||
<% if presenter.work_featurable? %> | ||
<%# OVERRIDE lines 38 & 41 from hyrax main branch 7/14/2021 %> | ||
<%= link_to "Feature", hyrax.featured_work_path(presenter, format: :json), | ||
data: { behavior: 'feature' }, | ||
class: presenter.display_feature_link? ? 'btn btn-default' : 'btn btn-default collapse' %> | ||
<%= link_to "Unfeature", hyrax.featured_work_path(presenter, format: :json), | ||
data: { behavior: 'unfeature' }, | ||
class: presenter.display_unfeature_link? ? 'btn btn-default' : 'btn btn-default collapse' %> | ||
<%# OVERRIDE to validate delete permission %> | ||
<% if current_ability.can?(:delete, presenter.solr_document) %> | ||
<%= link_to t('.delete'), [main_app, presenter], class: 'btn btn-danger', data: { confirm: t('.confirm_delete', work_type: presenter.human_readable_type) }, method: :delete %> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
<!-- COinS hook for Zotero --> | ||
<span class="Z3988" title="<%= export_as_openurl_ctx_kev(presenter) %>"></span> | ||
<!-- Render Modals --> | ||
<%= render 'hyrax/dashboard/collections/form_for_select_collection', user_collections: @user_collections %> | ||
<%= render 'hyrax/dashboard/collections/form_for_select_collection', user_collections: @user_collections %> |
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,3 +1,5 @@ | ||
<%# Override Hyrax 6.0 to modify class %> | ||
|
||
<div class="viewer-wrapper"> | ||
<iframe class='video-embed-viewer' src="<%="#{@presenter.solr_document[:video_embed_tesim].first}"%>" title="Video Player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> | ||
</div> |
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,70 +1,19 @@ | ||
<%# OVERRIDE Hyrax 2.9.5 %> | ||
<%# OVERRIDE Hyrax 5 to apply styling to pagination above public show collection works list %> | ||
|
||
<% if show_sort_and_per_page? && active_sort_fields.many? %> | ||
<% if show_sort_and_per_page? && collection_member_sort_fields.many? %> | ||
<%= form_tag collection_path(collection), method: :get, class: 'per_page form-horizontal' do %> | ||
<%= render 'view_type_group' %> | ||
<fieldset class="pull-left"> | ||
<fieldset class="float-left"> | ||
<legend class="sr-only"><%= t('hyrax.sort_label') %></legend> | ||
<%= label_tag(:sort) do %> | ||
<span>Sort By:</span> | ||
<% end %> | ||
<%# OVERRIDE here to change the select dropdown to a bootstrap btn group to style them%> | ||
<div class="btn-group"> | ||
<button id="sort-dropdown-text" type="button" class="btn dropdown-btn"> | ||
<% if h(params[:sort]).present? && active_sort_fields[h(params[:sort])].present? %> | ||
<%= active_sort_fields[h(params[:sort])].label %> | ||
<% else %> | ||
<%= active_sort_fields.first.last&.label %> | ||
<% end %> | ||
</button> | ||
<button type="button" class="btn dropdown-btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
<span class="caret"></span> | ||
<span class="sr-only">Toggle Dropdown</span> | ||
</button> | ||
<ul class="dropdown-menu"> | ||
<% active_sort_fields.each do |f| %> | ||
<li class="dropdown-item sort-dropdown-item" data-value="<%= f.first %>"><%= f.last.label %></li> | ||
<% end %> | ||
</ul> | ||
<% initial_sort_value = h(params[:sort]).present? ? h(params[:sort]) : active_sort_fields.keys.first %> | ||
<%= hidden_field_tag(:sort, initial_sort_value) %> | ||
</div> | ||
<%= label_tag(:sort, t('.sort_by_html')) %> | ||
|
||
<%= select_tag(:sort, options_from_collection_for_select(collection_member_sort_fields, 'first', lambda {|field| field.last.label}, h(params[:sort])), class: "btn-group btn dropdown-btn dropdown-toggle") %> | ||
<%= label_tag(:per_page) do %> | ||
<span class="tiny-nudge">Results Per Page:</span> | ||
<span class="tiny-nudge"><%= t('.results_per_page') %></span> | ||
<%= select_tag(:per_page, options_for_select(Hyrax.config.range_for_number_of_results_to_display_per_page, h(params[:per_page])), title: t('.number_of_results_to_display_per_page'), class: "btn-group btn dropdown-btn dropdown-toggle") %> | ||
<% end %> | ||
<% initial_per_page_value = h(params[:per_page]).present? ? h(params[:per_page]) : '10' %> | ||
<div class="btn-group tiny-nudge"> | ||
<button id="per-page-dropdown-text" type="button" class="btn dropdown-btn"><%= initial_per_page_value %></button> | ||
<button type="button" class="btn dropdown-btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
<span class="caret"></span> | ||
<span class="sr-only">Results Per Page</span> | ||
</button> | ||
<ul class="dropdown-menu"> | ||
<li class="dropdown-item per-page-dropdown-item" data-value="10">10</li> | ||
<li class="dropdown-item per-page-dropdown-item" data-value="20">20</li> | ||
<li class="dropdown-item per-page-dropdown-item" data-value="50">50</li> | ||
<li class="dropdown-item per-page-dropdown-item" data-value="100">100</li> | ||
</ul> | ||
<%= hidden_field_tag(:per_page, initial_per_page_value) %> | ||
</div> | ||
<%= render_hash_as_hidden_fields(search_state.params_for_search.except(:per_page, :sort)) %> | ||
<button class="btn btn-default tiny-nudge"><span class="glyphicon glyphicon-refresh"></span>Refresh</button> | ||
<%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search.except(:per_page, :sort)) %> | ||
<button class="btn btn-default tiny-nudge"><span class="fa fa-refresh"></span> <%= t('helpers.action.refresh') %></button> | ||
</fieldset> | ||
<% end %> | ||
<% end %> | ||
|
||
|
||
|
||
<script> | ||
$('.sort-dropdown-item').on('click', function(e) { | ||
e.preventDefault(); | ||
$('#sort').val(e.target.dataset.value); | ||
$('#sort-dropdown-text').html(e.target.innerText); | ||
}); | ||
|
||
$('.per-page-dropdown-item').on('click', function(e) { | ||
e.preventDefault(); | ||
$('#per_page').val(e.target.dataset.value); | ||
$('#per-page-dropdown-text').html(e.target.innerText); | ||
}); | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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