Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I914 update hyku #915

Merged
merged 14 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/assets/stylesheets/adl-overrides/adl-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ body.adventist_digital_library {
}
}

.btn.btn-default {
.btn.btn-secondary {
background-color: $white;
border-color: $darkyellow;
border: 2px solid $darkyellow;
Expand Down Expand Up @@ -104,7 +104,7 @@ body.adventist_digital_library {
}
}

.btn.btn-primary, .btn.btn-default {
.btn.btn-primary, .btn.btn-secondary{
&.disabled:hover,
&.disabled:hover,
&.disabled:focus,
Expand Down Expand Up @@ -296,7 +296,7 @@ body.adventist_digital_library {
}

.search-widgets, #sort-dropdown, #per_page-dropdown {
.btn.btn-default {
.btn.btn-secondary {
&.view-type-gallery, &.view-type-list, &.view-type-masonry, &.view-type-slideshow, &.dropdown-toggle {
border-color: $lightgreyborder;
color: $darkgrey;
Expand Down
19 changes: 8 additions & 11 deletions app/assets/stylesheets/adl-overrides/navbar.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
// Set the nav background color OUTSIDE of the body tag so that it can be overridden by appearance styles
.adventist_digital_library #masthead.navbar {
background: linear-gradient(to bottom, $mediumyellow, rgb(255, 255, 255), $transparentwhite, rgba(255, 255, 255, 0));
z-index: 1;
}

.adventist_digital_library #masthead.navbar.bg-dark {
background-color: transparent !important;
}

body.adventist_digital_library {
// MAIN NAV

// MAIN NAV

#masthead {
&.navbar {
height: 150px;
display: flex;
width: 100%;
margin-bottom: 0;
background: linear-gradient(to bottom, $mediumyellow, rgb(255, 255, 255), $transparentwhite, rgba(255, 255, 255, 0));
z-index: 1;

&.bg-dark {
background-color: transparent !important;
}

.nav-container {
padding-right: 0;
Expand Down
6 changes: 0 additions & 6 deletions app/controllers/hyku_knapsack/pages_controller.rb

This file was deleted.

44 changes: 0 additions & 44 deletions app/forms/hyrax/forms/admin/adl_appearance_decorator.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/jobs/file_sets_reprocess_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def perform(file_set_id:)
# this PDF.
return :has_children if parent.child_work_ids.any?

IiifPrint::Jobs::RequestSplitPdfJob.perform_later(file_set:, user: User.batch_user)
IiifPrint::Jobs::RequestSplitPdfJob.perform_later(file_set_id:, user: User.batch_user)
:requesting_split
end
# rubocop:enable Layout/LineLength
Expand Down
13 changes: 6 additions & 7 deletions app/jobs/iiif_print/child_works_from_pdf_job_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

# OVERRIDE: Overriding entire job temporarily, pending cleanup via
# https://github.com/notch8/adventist_knapsack/issues/728
# OVERRIDE to end job based on pdfjs/uv flipper before doing anything
# so we don't get job errors
require 'iiif_print/jobs/application_job'
Expand Down Expand Up @@ -67,6 +65,7 @@ def perform(id, pdf_paths, user, admin_set_id, *)
# rubocop:disable Metrics/MethodLength
def split_pdf(original_pdf_path, user, child_model, pdf_file_set)
user = User.find_by_user_key(user) unless user.is_a?(User)
# split the pdf into individual pages; pdf_file_set needed for derivative rodeo splitter
image_files = @parent_work.iiif_print_config.pdf_splitter_service.call(original_pdf_path, file_set: pdf_file_set)

# give as much info as possible if we don't have image files to work with.
Expand All @@ -92,11 +91,11 @@ def split_pdf(original_pdf_path, user, child_model, pdf_file_set)
operation_type: "PDF Batch Create"
)
BatchCreateJob.perform_later(user,
@child_work_titles,
@resource_types,
@uploaded_files,
attributes.merge!(model: child_model.to_s, split_from_pdf_id: @split_from_pdf_id).with_indifferent_access,
operation)
@child_work_titles,
@resource_types,
@uploaded_files,
attributes.merge!(model: child_model.to_s, split_from_pdf_id: @split_from_pdf_id).with_indifferent_access,
operation)
end
# rubocop:enable Metrics/MethodLength
# rubocop:enable Metrics/ParameterLists
Expand Down
33 changes: 0 additions & 33 deletions app/models/content_block_decorator.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/bulkrax/importers/_oai_adventist_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<%= fi.input :metadata_prefix, as: :string, hint: 'Such as oai_dc, dcterms or oai_qdc', input_html: { value: importer.parser_fields['metadata_prefix'] } %>

<%= fi.input :set, collection: [importer.parser_fields['set']], label: 'Set (source)', selected: importer.parser_fields['set'] %>
<button type="button" class="btn btn-default refresh-set-source">Refresh Sets</button>
<button type="button" class="btn btn-secondary refresh-set-source">Refresh Sets</button>

<%= fi.input :visibility,
collection: [
Expand Down
13 changes: 0 additions & 13 deletions app/views/hyrax/admin/appearances/_default_colors_form.html.erb

This file was deleted.

4 changes: 2 additions & 2 deletions app/views/hyrax/base/_pdf_js.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%# Override Hyku 5 to send presenter to pdf_js_url method %>
<%# Override Hyku 5 to send presenter to pdf_js_url method instead of download_path %>
<div class="viewer-wrapper">
<iframe id="pdf-viewer" aria-label="image view"
src="<%= pdf_js_url(file_set_presenter) %>"
allowfullscreen="true"
frameborder="0"
></iframe>
</div>
</div>
85 changes: 43 additions & 42 deletions app/views/hyrax/base/_show_actions.html.erb
Original file line number Diff line number Diff line change
@@ -1,53 +1,54 @@
<%# 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' %>
<% 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-secondary 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-secondary' : 'btn btn-secondary 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' %>
<%= link_to t('.unfeature'), hyrax.featured_work_path(presenter, format: :json),
data: { behavior: 'unfeature' },
class: presenter.display_unfeature_link? ? 'btn btn-secondary' : 'btn btn-secondary collapse' %>
<% end %>
<% end %>
<% end %>
<% if Hyrax.config.analytics? %>
<% # 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? && !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' %>
<% if Hyrax.config.analytics_reporting? %>
<% # 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-secondary', data: { turbolinks: false } %>
<% 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') %>
</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 %>
<%# override to keep buttons together %>
<% if presenter.editor? && !workflow_restriction?(presenter) %>
<%= link_to t('.edit'), edit_polymorphic_path([main_app, presenter]), class: 'btn btn-secondary', 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-secondary' %>
<% end %>
<% if presenter.valid_child_concerns.length > 0 %>
<div class="btn-group">
<button type="button" class="btn btn-secondary dropdown-toggle" type="button" id="dropdown-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<%= 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>
</div>
<% end %>
<%# 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 %>
<%# 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 %>
<% end %>
</div>

<!-- COinS hook for Zotero -->
<span class="Z3988" title="<%= export_as_openurl_ctx_kev(presenter) %>"></span>
<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 %>
2 changes: 0 additions & 2 deletions app/views/hyrax/base/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
<div class="col-sm-3 text-center">
<%= 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 class="col-sm-9">
Expand Down
19 changes: 0 additions & 19 deletions app/views/hyrax/collections/_sort_and_per_page.html.erb

This file was deleted.

13 changes: 7 additions & 6 deletions app/views/hyrax/journal_articles/_form_metadata.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<%# OVERRIDE Hyrax 5.0 for custom label %>
<div class="base-terms">
<% f.object.primary_terms.each do |term| %>
<%= render_edit_field_partial(term, f: f) %>
<% end %>
</div>
<% if f.object.display_additional_fields? %>
<%= link_to t('hyrax.works.form.additional_fields'),
'#extended-terms',
class: 'btn btn-default additional-fields',
data: { toggle: 'collapse' },
role: "button",
'aria-expanded'=> "false",
'aria-controls'=> "extended-terms" %>
'#extended-terms',
class: 'btn btn-secondary additional-fields',
data: { toggle: 'collapse' },
role: "button",
'aria-expanded'=> "false",
'aria-controls'=> "extended-terms" %>
<div id="extended-terms" class='collapse'>
<%= render 'form_media', f: f %>
<% f.object.secondary_terms.each do |term| %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<%= link_to t(:'hyrax.controls.about'), hyrax.about_path, class: 'nav-link', aria: current_page?(hyrax.about_path) ? {current: 'page'} : nil %>
</li>

<li class="nav-item <%= 'active' if current_page?(hyku_knapsack.resources_path) %>">
<%= link_to t(:'hyrax.controls.resources'), hyku_knapsack.resources_path, class: 'nav-link', aria: current_page?(hyku_knapsack.resources_path) ? {current: 'page'} : nil %>
<li class="nav-item <%= 'active' if current_page?(hyrax.help_path) %>">
<%= link_to t(:'hyrax.controls.help'), hyrax.help_path, class: 'nav-link', aria: current_page?(hyrax.help_path) ? {current: 'page'} : nil %>
</li>

<li class="nav-item <%= 'active' if current_page?(hyrax.contact_path) %>">
Expand Down
Loading
Loading