-
- <% page.attributes.each do |title, attributes| %>
-
- <% end %>
-
From 70a1e65b0722bb0607ae7753069a2eb4a2614b7e Mon Sep 17 00:00:00 2001 From: jazairi <16103405+jazairi@users.noreply.github.com> Date: Tue, 13 Jan 2026 16:17:37 -0500 Subject: [PATCH] Upgrade administrate to v1 - Merge v1 templates into local customizations - Load jQuery separately (it is no longer an administrate dependency) - Ensure stylesheet reloads with Turbo (this is required due to links from the main ETD UI to the admin UI) --- Gemfile | 3 +- Gemfile.lock | 24 ++++---- app/views/admin/holds/_form.html.erb | 2 +- app/views/admin/theses/show.html.erb | 64 ++++++++++++-------- app/views/layouts/admin/application.html.erb | 2 +- 5 files changed, 54 insertions(+), 41 deletions(-) diff --git a/Gemfile b/Gemfile index 21687522..5fc55a17 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ git_source(:github) do |repo_name| "https://github.com/#{repo_name}.git" end -gem 'administrate', '~> 0.20.0' +gem 'administrate', '~> 1.0.0' gem 'aws-sdk-rails' gem 'aws-sdk-s3' gem 'aws-sdk-sqs' @@ -17,6 +17,7 @@ gem 'csv' gem 'delayed_job_active_record' gem 'devise' gem 'flipflop' +gem 'jquery-rails' gem 'json' gem 'kaminari' gem 'lograge' diff --git a/Gemfile.lock b/Gemfile.lock index aab0c451..24b3cd78 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -85,14 +85,11 @@ GEM tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.8) public_suffix (>= 2.0.2, < 8.0) - administrate (0.20.1) - actionpack (>= 6.0, < 8.0) - actionview (>= 6.0, < 8.0) - activerecord (>= 6.0, < 8.0) - jquery-rails (~> 4.6.0) + administrate (1.0.0) + actionpack (>= 6.0, < 9.0) + actionview (>= 6.0, < 9.0) + activerecord (>= 6.0, < 9.0) kaminari (~> 1.2.2) - sassc-rails (~> 2.1) - selectize-rails (~> 0.6) annotate (3.2.0) activerecord (>= 3.2, < 8.0) rake (>= 10.4, < 14.0) @@ -178,7 +175,7 @@ GEM erb (6.0.1) erubi (1.13.1) execjs (2.10.0) - ffi (1.17.1) + ffi (1.17.3) flipflop (2.8.0) activesupport (>= 4.0) terminal-table (>= 1.8) @@ -195,7 +192,7 @@ GEM rdoc (>= 4.0.0) reline (>= 0.4.2) jmespath (1.6.2) - jquery-rails (4.6.0) + jquery-rails (4.6.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) @@ -397,7 +394,6 @@ GEM scout_apm (6.0.2) parser securerandom (0.4.1) - selectize-rails (0.12.6) selenium-webdriver (4.39.0) base64 (~> 0.2) logger (~> 1.4) @@ -422,8 +418,9 @@ GEM simplecov_json_formatter (0.1.4) skylight (7.0.0) activesupport (>= 7.1.0) - sprockets (4.2.1) + sprockets (4.2.2) concurrent-ruby (~> 1.0) + logger rack (>= 2.2.4, < 4) sprockets-rails (3.5.2) actionpack (>= 6.1) @@ -437,7 +434,7 @@ GEM terser (1.2.6) execjs (>= 0.3.0, < 3) thor (1.5.0) - tilt (2.6.0) + tilt (2.7.0) timecop (0.9.10) timeout (0.6.0) tsort (0.2.0) @@ -473,7 +470,7 @@ PLATFORMS ruby DEPENDENCIES - administrate (~> 0.20.0) + administrate (~> 1.0.0) annotate aws-sdk-rails aws-sdk-s3 @@ -491,6 +488,7 @@ DEPENDENCIES devise dotenv-rails flipflop + jquery-rails json kaminari letter_opener diff --git a/app/views/admin/holds/_form.html.erb b/app/views/admin/holds/_form.html.erb index 1be23840..571f6ec0 100644 --- a/app/views/admin/holds/_form.html.erb +++ b/app/views/admin/holds/_form.html.erb @@ -14,7 +14,7 @@ and renders all form fields for a resource's editable attributes. [1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Form %> -<%= form_for([namespace, page.resource], html: { class: "form" }) do |f| %> +<%= form_with(model: page.resource, url: [namespace, page.resource], scope: page.resource, local: true, class: "form") do |f| %> <% if page.resource.errors.any? %>