Skip to content

Commit

Permalink
Merge branch 'main' into update-submodule-remove-simple-schema-loader…
Browse files Browse the repository at this point in the history
…-decorator
  • Loading branch information
orangewolf committed Sep 6, 2024
2 parents 1376051 + 0c31855 commit 8534651
Show file tree
Hide file tree
Showing 13 changed files with 117 additions and 283 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ FROM ghcr.io/samvera/hyku/base:20b8c56e as hyku-knap-base

# This is specifically NOT $APP_PATH but the parent directory
COPY --chown=1001:101 . /app/samvera
COPY --chown=1001:101 bundler.d/ /app/.bundler.d/
RUN ln -s /app/samvera/bundler.d /app/.bundler.d
ENV BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera
ENV BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true
ENV BUNDLE_BUNDLER_INJECT__GEM_PATH=/app/samvera/bundler.d

RUN bundle install --jobs "$(nproc)"

Expand Down
Binary file added app/assets/images/default-collection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/controllers/application_controller_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def global_request_logging

def set_sentry_context
Sentry.set_user(id: session[:current_user_id]) # Set user context
Sentry.set_extras(params: params.to_unsafe_h, url: request.url) # Set extra context
Sentry.set_extras(params: params.to_unsafe_h, url: request.url) # Set extra context
end
end

Expand Down
13 changes: 13 additions & 0 deletions app/services/adl/thumbnail_path_service_decorator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

# OVERRIDE Hyrax v5.0.0rc2 + Hyku v6.0 - to set custom collection thumbnail default

module Adl
module ThumbnailPathServiceDecorator
def default_collection_image
Site.instance.default_collection_image&.url || ActionController::Base.helpers.image_path('default-collection.png')
end
end
end

Hyrax::ThumbnailPathServiceDecorator.prepend(Adl::ThumbnailPathServiceDecorator)
213 changes: 0 additions & 213 deletions app/services/hyrax/analytics/ga4.rb

This file was deleted.

28 changes: 15 additions & 13 deletions app/views/themes/reshare_show/_user_util_links.html.erb
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<ul id="user_utility_links" class="nav navbar-nav navbar-right">
<ul id="user_utility_links" class="navbar-nav ml-auto">
<%= render 'shared/locale_picker' if available_translations.size > 1 %>
<% if current_ability.user_groups.include?('admin') %>
<li>
<li class="nav-item">
<%= render_notifications(user: current_user) %>
</li>
<li class="dropdown">
<%= link_to hyrax.dashboard_profile_path(current_user), role: 'button', data: { toggle: 'dropdown' }, aria: { haspopup: true, expanded: false, controls: 'user-util-links' } do %>
<%= link_to hyrax.dashboard_profile_path(current_user), class: 'nav-link dropdown-toggle', id: 'navbarDropdown', role: 'button', data: { toggle: 'dropdown' }, aria: { haspopup: true, expanded: false } do %>
<span class="sr-only"><%= t("hyrax.toolbar.profile.sr_action") %></span>
<span class="hidden-xs">&nbsp;<%= current_user.name %></span>
<%= current_user.name %>
<span class="sr-only"> <%= t("hyrax.toolbar.profile.sr_target") %></span>
<span class="fa fa-user" aria-hidden="true"></span>
<span class="caret"></span>
<i class="fa fa-user" aria-hidden="true"></i>
<% end %>
<ul id="user-util-links" class="dropdown-menu dropdown-menu-right" role="menu">
<li><%= link_to t("hyrax.toolbar.dashboard.menu"), hyrax.dashboard_path %></li>

<li class="divider"></li>
<li><%= link_to t("hyku.toolbar.profile.edit_registration"), main_app.edit_user_registration_path %></li>
<li><%= link_to t("hyrax.toolbar.profile.logout"), main_app.destroy_user_session_path %></li>
</ul>
<div id="user-util-links" class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="<%= hyrax.dashboard_path %>"><%= t("hyrax.toolbar.dashboard.menu") %></a>
<% if Flipflop.show_login_link? || current_ability.user_groups.include?('admin') %>
<div class="dropdown-divider"></div>
<% if Devise.mappings[:user]&.registerable? %>
<a class="dropdown-item" href="<%= main_app.edit_user_registration_path %>"><%= t("hyku.toolbar.profile.edit_registration") %></a>
<% end %>
<a class="dropdown-item" href="<%= main_app.destroy_user_session_path %>"><%= t("hyrax.toolbar.profile.logout") %></a>
<% end %>
</div>
</li><!-- /.btn-group -->
<% end %>
</ul>
6 changes: 3 additions & 3 deletions bundler.d/example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
# or `ensure_gem` to make sure a gem is there w/o worrying about if it is an
# override or not

gem "sentry-ruby"
gem "sentry-rails"
gem "sentry-sidekiq"
ensure_gem "sentry-ruby"
ensure_gem "sentry-rails"
ensure_gem "sentry-sidekiq"
16 changes: 12 additions & 4 deletions config/metadata/collection_resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ attributes:
- "bibliographic_citation_sim"
- "bibliographic_citation_tesim"
predicate: http://purl.org/dc/terms/bibliographicCitation
collection_subtitle:
type: string
multiple: true
form:
primary: true
index_keys:
- 'collection_subtitle_sim'
- 'collection_subtitle_tesim'
contributor:
type: string
multiple: true
Expand All @@ -88,8 +96,8 @@ attributes:
type: string
multiple: true
form:
required: true
primary: true
required: false
primary: false
index_keys:
- "creator_sim"
- "creator_tesim"
Expand All @@ -107,7 +115,7 @@ attributes:
type: string
multiple: true
form:
primary: false
primary: true
index_keys:
- "description_sim"
- "description_tesim"
Expand Down Expand Up @@ -202,7 +210,7 @@ attributes:
type: string
multiple: true
form:
primary: true
primary: false
index_keys:
- "rights_statement_sim"
- "rights_statement_tesim"
Expand Down
19 changes: 19 additions & 0 deletions config/show_themes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# These settings are to provide information about your theme
# and should follow the format
# theme:
# name: Theme notes
# notes: Notes about the theme you want to display
#
default_show:
name: Default Show Page
notes: This is the default Hyku show page. It is recommended for use with cultural repositories.
cultural_show:
name: Cultural Show Page
notes: This image based show page is recommended for cultural repositories.
scholarly_show:
name: Scholarly Show Page
notes: This text based show page is recommended for institutional repositories.
reshare_show:
name: ReShare Show Page
notes: For ReShare CDL Pilot use only, do not use unless instructed to do so.

2 changes: 1 addition & 1 deletion hyrax-webapp
Submodule hyrax-webapp updated 82 files
+7 −1 .rubocop.yml
+37 −190 .rubocop_fixme.yml
+2 −7 .rubocop_todo.yml
+8 −4 Gemfile
+42 −28 Gemfile.lock
+35 −5 app/assets/stylesheets/hyku.scss
+34 −0 app/controllers/concerns/hyku/home_page_themes_behavior.rb
+1 −0 app/controllers/hyrax/admin/appearances_controller_decorator.rb
+1 −20 app/controllers/hyrax/contact_form_controller_decorator.rb
+2 −0 app/controllers/hyrax/dashboard/collections_controller_decorator.rb
+5 −19 app/controllers/hyrax/homepage_controller.rb
+1 −21 app/controllers/hyrax/pages_controller_decorator.rb
+1 −1 app/forms/admin_set_resource_form.rb
+50 −92 app/forms/hyku/forms/admin/appearance.rb
+3 −1 app/helpers/blacklight/catalog_helper_behavior_decorator.rb
+22 −32 app/jobs/batch_email_notification_job.rb
+8 −19 app/jobs/depositor_email_notification_job.rb
+4 −16 app/jobs/embargo_auto_expiry_job.rb
+4 −16 app/jobs/lease_auto_expiry_job.rb
+30 −0 app/jobs/migrate_resources_job.rb
+12 −0 app/jobs/tenant_maintenance_job.rb
+11 −0 app/jobs/user_stat_collection_job.rb
+2 −0 app/listeners/hyrax_listener.rb
+2 −2 app/mailers/hyku_mailer.rb
+20 −1 app/models/account.rb
+4 −0 app/models/concerns/account_cname.rb
+1 −1 app/models/concerns/pdf_behavior.rb
+1 −1 app/models/domain_name.rb
+1 −1 app/models/featured_collection_list.rb
+12 −6 app/models/sushi.rb
+2 −0 app/models/sushi/item_report.rb
+4 −0 app/models/sushi/platform_report.rb
+2 −0 app/models/sushi/platform_usage_report.rb
+2 −2 app/models/sushi/report_list.rb
+10 −0 app/models/user.rb
+6 −0 app/models/user_batch_email.rb
+1 −7 app/services/create_account.rb
+1 −1 app/services/hyrax/thumbnail_path_service_decorator.rb
+1 −1 app/services/iiif_print/tenant_config.rb
+1 −1 app/services/import_counter_metrics.rb
+30 −30 app/views/hyku_mailer/depositor_email.html.erb
+2 −2 app/views/hyrax/base/_download_pdf.html.erb
+42 −0 app/views/hyrax/content_blocks/_form.html.erb
+14 −13 app/views/hyrax/dashboard/sidebar/_configuration.html.erb
+31 −29 app/views/hyrax/homepage/_featured_collection_section.html.erb
+1 −1 app/views/shared/_appearance_styles.html.erb
+1 −0 app/views/themes/cultural_repository/_collections_section.html.erb
+4 −4 app/views/themes/institutional_repository/hyrax/homepage/_recent_document.html.erb
+3 −1 app/views/themes/institutional_repository/hyrax/homepage/_recently_uploaded.html.erb
+4 −4 app/views/themes/neutral_repository/hyrax/homepage/_recent_document.html.erb
+3 −1 app/views/themes/neutral_repository/hyrax/homepage/_recently_uploaded.html.erb
+6 −1 config/application.rb
+4 −0 config/initializers/hyrax.rb
+1 −1 config/locales/simple_form.en.yml
+5 −0 db/migrate/20240820195641_remove_last_emailed_at_from_users.rb
+10 −0 db/migrate/20240820200440_create_user_batch_emails.rb
+10 −2 db/schema.rb
+18 −0 lib/active_job_tenant.rb
+7 −0 lib/tasks/index.rake
+1 −1 lib/tasks/tenantize_task.rake
+38 −0 spec/controllers/concerns/hyku/home_page_themes_behavior_spec.rb
+1 −1 spec/features/admin_set_form_participants_tab_spec.rb
+1 −1 spec/features/appearance_theme_spec.rb
+1 −1 spec/features/create_generic_work_spec.rb
+1 −1 spec/features/create_image_spec.rb
+1 −1 spec/features/work_editor_role_spec.rb
+1 −1 spec/forms/hyku/forms/admin/appearance_spec.rb
+28 −18 spec/jobs/batch_email_notification_job_spec.rb
+22 −4 spec/jobs/depositor_email_notification_job_spec.rb
+8 −4 spec/jobs/embargo_auto_expiry_job_spec.rb
+8 −4 spec/jobs/lease_auto_expiry_job_spec.rb
+33 −0 spec/jobs/migrate_resources_job_spec.rb
+13 −0 spec/jobs/tenant_maintenance_job_spec.rb
+22 −0 spec/jobs/user_stat_collection_job_spec.rb
+1 −1 spec/models/account_spec.rb
+1 −1 spec/models/sushi_spec.rb
+1 −1 spec/models/uploaded_file_spec.rb
+1 −1 spec/routing/featured_collections_route_spec.rb
+11 −7 spec/services/create_account_spec.rb
+1 −1 spec/views/hyku/admin/appearances/show.html.erb_spec.rb
+1 −1 spec/views/hyrax/content_blocks/edit.html.erb_spec.rb
+83 −40 yarn.lock
6 changes: 3 additions & 3 deletions ops/staging-deploy.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ ingress:
secretName: palni-palci-staging-tls

extraEnvVars: &envVars
- name: BUNDLE_BUNDLER_INJECT__GEM_PATH
value: /app/samvera/bundler.d
- name: BUNDLE_DISABLE_LOCAL_BRANCH_CHECK
value: "true"
- name: BUNDLE_LOCAL__HYKU_KNAPSACK
Expand Down Expand Up @@ -181,7 +179,7 @@ extraEnvVars: &envVars
- name: SOLR_COLLECTION_NAME
value: palni-palci-staging
- name: SOLR_CONFIGSET_NAME
value: palni-palci-staging
value: production-palni-palci
- name: SOLR_HOST
value: solr.solr
- name: SOLR_PORT
Expand All @@ -194,6 +192,8 @@ extraEnvVars: &envVars
value: testing123
- name: VALKYRIE_ID_TYPE
value: string
- name: VALKYRIE_TRANSITION
value: "true"

worker:
replicaCount: 1
Expand Down
Loading

0 comments on commit 8534651

Please sign in to comment.