Skip to content

Commit

Permalink
feat: render chronlist, bibref and tables in notes
Browse files Browse the repository at this point in the history
  • Loading branch information
yetti committed Jun 19, 2024
1 parent b79d61f commit 3ed183a
Show file tree
Hide file tree
Showing 22 changed files with 1,262 additions and 56 deletions.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ RSpec/ExampleLength:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/MultipleMemoizedHelpers:
Enabled: false
RSpec/VerifiedDoubles:
Enabled: false
Bundler/DuplicatedGem:
Enabled: false
Capybara:
Expand Down
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ gem "blacklight_range_limit", git: "https://github.com/nla/blacklight_range_limi
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[mri mingw x64_mingw]
gem "standard", require: false
gem "standard", "~> 1.37", require: false
gem "rubocop-rails", require: false
gem "rubocop-rspec", require: false
gem "rubocop-performance", require: false
Expand All @@ -111,6 +111,8 @@ group :development, :test do
gem "shoulda-matchers"
gem "factory_bot_rails"
gem "faker"

gem "foreman"
end

group :development do
Expand Down
83 changes: 44 additions & 39 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.5)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
aes_key_wrap (1.1.0)
annotaterb (4.9.0)
anyway_config (2.6.4)
ruby-next-core (~> 1.0)
arclight (1.0.1)
arclight (1.4.0)
blacklight (>= 8.0.0, < 9)
gretel
rails (~> 7.0)
Expand All @@ -118,7 +118,7 @@ GEM
awesome_print (1.9.2)
base64 (0.2.0)
bcrypt (3.1.20)
benchmark-ips (2.12.0)
benchmark-ips (2.13.0)
better_errors (2.10.1)
erubi (>= 1.0.0)
rack (>= 0.9.0)
Expand All @@ -128,7 +128,7 @@ GEM
bindex (0.8.1)
binding_of_caller (1.0.1)
debug_inspector (>= 1.2.0)
blacklight (8.2.0)
blacklight (8.3.0)
globalid
i18n (>= 1.7.0)
jbuilder (~> 2.7)
Expand All @@ -138,27 +138,28 @@ GEM
view_component (>= 2.66, < 4)
blacklight-locale_picker (1.1.0)
rails (>= 5.2.3, < 7.2)
bootsnap (1.17.0)
bootsnap (1.18.3)
msgpack (~> 1.2)
brakeman (6.1.2)
racc
builder (3.3.0)
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
capybara (3.39.2)
capybara (3.40.0)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
nokogiri (~> 1.11)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
cgi (0.4.1)
concurrent-ruby (1.3.3)
connection_pool (2.4.1)
crack (0.4.5)
crack (1.0.0)
bigdecimal
rexml
crass (1.0.6)
cssbundling-rails (1.4.0)
Expand Down Expand Up @@ -195,60 +196,63 @@ GEM
warden (~> 1.2.3)
diff-lcs (1.5.1)
docile (1.4.0)
domain_name (0.6.20231109)
domain_name (0.6.20240107)
dot-properties (0.1.4)
bundler (>= 2.2.33)
dotenv (3.0.3)
dotenv (3.1.2)
dry-initializer (3.1.1)
erubi (1.13.0)
factory_bot (6.4.6)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
faker (3.2.2)
faker (3.4.1)
i18n (>= 1.8.11, < 2)
faraday (2.9.0)
faraday (2.9.1)
faraday-net_http (>= 2.0, < 3.2)
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-net_http (3.1.0)
net-http
ffi (1.16.3)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi-compiler (1.3.2)
ffi (>= 1.15.5)
rake
flamegraph (0.9.5)
foreman (0.88.1)
fuubar (2.5.1)
rspec-core (~> 3.0)
ruby-progressbar (~> 1.4)
get_process_mem (0.2.7)
ffi (~> 1.0)
globalid (1.2.1)
activesupport (>= 6.1)
gretel (4.6.0)
gretel (5.0.0)
actionview (>= 5.1, < 7.2)
railties (>= 5.1, < 7.2)
hashdiff (1.0.1)
hashdiff (1.1.0)
hashie (5.0.0)
heapy (0.2.0)
thor
hiredis (0.6.3)
hiredis-client (0.18.0)
redis-client (= 0.18.0)
http (5.1.1)
http (5.2.0)
addressable (~> 2.8)
base64 (~> 0.1)
http-cookie (~> 1.0)
http-form_data (~> 2.2)
llhttp-ffi (~> 0.4.0)
http-cookie (1.0.5)
llhttp-ffi (~> 0.5.0)
http-cookie (1.0.6)
domain_name (~> 0.5)
http-form_data (2.3.0)
httpclient (2.8.3)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
irb (1.13.1)
irb (1.13.2)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jbuilder (2.12.0)
Expand Down Expand Up @@ -282,7 +286,7 @@ GEM
kaminari-core (1.2.2)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
llhttp-ffi (0.4.0)
llhttp-ffi (0.5.0)
ffi-compiler (~> 1.0)
rake (~> 13.0)
lograge (0.14.0)
Expand All @@ -306,7 +310,7 @@ GEM
marc (~> 1.0)
marcel (1.0.4)
matrix (0.4.2)
memory_profiler (1.0.1)
memory_profiler (1.0.2)
method_source (1.1.0)
mini_histogram (0.3.1)
mini_mime (1.1.5)
Expand All @@ -319,7 +323,7 @@ GEM
mysql2 (0.5.6)
net-http (0.4.1)
uri
net-imap (0.4.12)
net-imap (0.4.13)
date
net-protocol
net-pop (0.1.2)
Expand Down Expand Up @@ -364,7 +368,7 @@ GEM
prometheus-client (4.2.2)
psych (5.1.2)
stringio
public_suffix (5.0.4)
public_suffix (5.1.0)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.8.0)
Expand Down Expand Up @@ -417,17 +421,17 @@ GEM
redis-client (0.18.0)
connection_pool
regexp_parser (2.9.2)
reline (0.5.8)
reline (0.5.9)
io-console (~> 0.5)
request_store (1.5.1)
request_store (1.7.0)
rack (>= 1.4)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
retriable (3.1.2)
rexml (3.3.0)
strscan
rouge (4.2.0)
rouge (4.3.0)
rsolr (2.6.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
Expand Down Expand Up @@ -468,11 +472,11 @@ GEM
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.23.1)
rubocop-rails (2.25.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.0.1)
rubocop (~> 1.61)
ruby-next-core (1.0.3)
Expand All @@ -485,7 +489,7 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
shoulda-matchers (6.1.0)
shoulda-matchers (6.2.0)
activesupport (>= 5.2.0)
simplecov (0.22.0)
docile (~> 1.1)
Expand Down Expand Up @@ -527,13 +531,13 @@ GEM
rubocop-performance (~> 1.21.0)
stimulus-rails (1.3.3)
railties (>= 6.0.0)
stringio (3.1.0)
strong_migrations (1.7.0)
stringio (3.1.1)
strong_migrations (1.8.0)
activerecord (>= 5.2)
strscan (3.1.0)
thor (1.3.1)
timeout (0.4.1)
traject (3.8.1)
traject (3.8.2)
concurrent-ruby (>= 0.8.0)
dot-properties (>= 0.1.1)
hashie (>= 3.1, < 6)
Expand All @@ -549,7 +553,7 @@ GEM
deprecation
jsonpath
traject (~> 3.0)
turbo-rails (1.5.0)
turbo-rails (2.0.5)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
railties (>= 6.0.0)
Expand All @@ -572,7 +576,7 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webmock (3.19.1)
webmock (3.23.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand Down Expand Up @@ -600,7 +604,7 @@ GEM
railties
yabeda (~> 0.8)
yell (2.2.2)
zeitwerk (2.6.15)
zeitwerk (2.6.16)
zk (1.10.0)
zookeeper (~> 1.5.0)
zookeeper (1.5.5)
Expand Down Expand Up @@ -630,6 +634,7 @@ DEPENDENCIES
factory_bot_rails
faker
flamegraph
foreman
fuubar
hiredis (~> 0.6.3)
hiredis-client (~> 0.18.0)
Expand Down Expand Up @@ -659,7 +664,7 @@ DEPENDENCIES
solr_wrapper (>= 0.3)
sprockets-rails
stackprof
standard
standard (~> 1.37)
stimulus-rails
strong_migrations (~> 1.7)
turbo-rails
Expand All @@ -675,4 +680,4 @@ RUBY VERSION
ruby 3.2.2p53

BUNDLED WITH
2.5.10
2.5.13
13 changes: 13 additions & 0 deletions app/assets/stylesheets/nla/_nla-custom-bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,16 @@ $form-check-input-focus-box-shadow: $focus-ring-box-shadow;
$nav-link-focus-box-shadow: $focus-ring-box-shadow;
$pagination-focus-box-shadow: $focus-ring-box-shadow;
$btn-close-focus-shadow: $focus-ring-box-shadow;

// Tables
$table-variants: (
"primary": shift-color($primary, $table-bg-scale),
"secondary": shift-color($secondary, $table-bg-scale),
"success": shift-color($success, $table-bg-scale),
"info": shift-color($info, $table-bg-scale),
"warning": shift-color($warning, $table-bg-scale),
"danger": shift-color($danger, $table-bg-scale),
"light": $light,
"dark": $dark,
"purple": $purple
)
11 changes: 11 additions & 0 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ class CatalogController < ApplicationController
config.add_background_field "biog",
label: I18n.t("ead_notes.biog"),
helper_method: :render_html_tags,
presenter: SubnotesPresenter,
values: ->(__field_config, document, _context) { document.extract_notes_by_header("biog") }
config.add_background_field "org_hist",
label: I18n.t("ead_notes.org_hist"),
Expand Down Expand Up @@ -366,6 +367,16 @@ class CatalogController < ApplicationController
config.add_background_field "physdesc_dimensions", field: "physdesc_dimensions_ssi", label: I18n.t("ead_notes.dimensions"), helper: :render_html_tags
config.add_background_field "materialspec", field: "meterialspec_tesim", label: I18n.t("ead_notes.material_spec"), helper: :render_html_tags
config.add_background_field "physdesc", field: "physdesc_facet_ssi", label: I18n.t("ead_notes.phys_desc"), helper: :render_html_tags
config.add_background_field "container_list",
label: I18n.t("ead_notes.container_list"),
helper_method: :render_html_tags,
presenter: SubnotesPresenter,
values: ->(__field_config, document, _context) { document.extract_notes_by_header("container_list") }
config.add_background_field "box_list",
label: I18n.t("ead_notes.box_list"),
helper_method: :render_html_tags,
presenter: SubnotesPresenter,
values: ->(__field_config, document, _context) { document.extract_notes_by_header("box_list") }

# Collection Show Page - Related Section
config.add_related_field "relatedmaterial", field: "relatedmaterial_html_tesm", helper_method: :render_html_tags
Expand Down
Loading

0 comments on commit 3ed183a

Please sign in to comment.