Skip to content

Commit

Permalink
Merge branch 'main' into 4581-handle-patron-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rladdusaw authored Dec 16, 2024
2 parents 7cd77f5 + 39c1e79 commit d4c218d
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 108 deletions.
120 changes: 60 additions & 60 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,71 +8,71 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.5)
actionpack (= 7.1.5)
activesupport (= 7.1.5)
actioncable (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.5)
actionpack (= 7.1.5)
activejob (= 7.1.5)
activerecord (= 7.1.5)
activestorage (= 7.1.5)
activesupport (= 7.1.5)
actionmailbox (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.5)
actionpack (= 7.1.5)
actionview (= 7.1.5)
activejob (= 7.1.5)
activesupport (= 7.1.5)
actionmailer (7.1.5.1)
actionpack (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.5)
actionview (= 7.1.5)
activesupport (= 7.1.5)
actionpack (7.1.5.1)
actionview (= 7.1.5.1)
activesupport (= 7.1.5.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.5)
actionpack (= 7.1.5)
activerecord (= 7.1.5)
activestorage (= 7.1.5)
activesupport (= 7.1.5)
actiontext (7.1.5.1)
actionpack (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.5)
activesupport (= 7.1.5)
actionview (7.1.5.1)
activesupport (= 7.1.5.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.5)
activesupport (= 7.1.5)
activejob (7.1.5.1)
activesupport (= 7.1.5.1)
globalid (>= 0.3.6)
activemodel (7.1.5)
activesupport (= 7.1.5)
activerecord (7.1.5)
activemodel (= 7.1.5)
activesupport (= 7.1.5)
activemodel (7.1.5.1)
activesupport (= 7.1.5.1)
activerecord (7.1.5.1)
activemodel (= 7.1.5.1)
activesupport (= 7.1.5.1)
timeout (>= 0.4.0)
activestorage (7.1.5)
actionpack (= 7.1.5)
activejob (= 7.1.5)
activerecord (= 7.1.5)
activesupport (= 7.1.5)
activestorage (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activesupport (= 7.1.5.1)
marcel (~> 1.0)
activesupport (7.1.5)
activesupport (7.1.5.1)
base64
benchmark (>= 0.3)
bigdecimal
Expand Down Expand Up @@ -379,7 +379,7 @@ GEM
llhttp-ffi (0.5.0)
ffi-compiler (~> 1.0)
rake (~> 13.0)
logger (1.6.1)
logger (1.6.3)
lograge (0.14.0)
actionpack (>= 4)
activesupport (>= 4)
Expand All @@ -406,7 +406,7 @@ GEM
method_source (1.1.0)
mini_mime (1.1.5)
mini_portile2 (2.8.8)
minitest (5.25.1)
minitest (5.25.4)
msgpack (1.7.5)
multi_xml (0.6.0)
mutex_m (0.3.0)
Expand All @@ -430,12 +430,12 @@ GEM
net-protocol
net-ssh (7.3.0)
nio4r (2.7.4)
nokogiri (1.16.8)
nokogiri (1.17.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.8-aarch64-linux)
nokogiri (1.17.2-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.8-x86_64-linux)
nokogiri (1.17.2-x86_64-linux)
racc (~> 1.4)
observer (0.1.2)
omniauth (2.1.2)
Expand Down Expand Up @@ -489,20 +489,20 @@ GEM
rack (>= 1.3)
rackup (2.2.1)
rack (>= 3)
rails (7.1.5)
actioncable (= 7.1.5)
actionmailbox (= 7.1.5)
actionmailer (= 7.1.5)
actionpack (= 7.1.5)
actiontext (= 7.1.5)
actionview (= 7.1.5)
activejob (= 7.1.5)
activemodel (= 7.1.5)
activerecord (= 7.1.5)
activestorage (= 7.1.5)
activesupport (= 7.1.5)
rails (7.1.5.1)
actioncable (= 7.1.5.1)
actionmailbox (= 7.1.5.1)
actionmailer (= 7.1.5.1)
actionpack (= 7.1.5.1)
actiontext (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activemodel (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
bundler (>= 1.15.0)
railties (= 7.1.5)
railties (= 7.1.5.1)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -511,12 +511,12 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.1)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (7.1.5)
actionpack (= 7.1.5)
activesupport (= 7.1.5)
railties (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
Expand Down Expand Up @@ -606,7 +606,7 @@ GEM
sprockets-rails
tilt
scrub_rb (1.0.1)
securerandom (0.3.2)
securerandom (0.4.1)
selenium-webdriver (4.26.0)
base64 (~> 0.2)
logger (~> 1.4)
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,9 @@ class CatalogController < ApplicationController
config.add_search_field('series_title') do |field|
field.include_in_simple_select = false
field.label = 'Series title'
field.solr_adv_parameters = {
qf: '$series_title_qf',
pf: '$series_title_pf'
field.solr_parameters = {
qf: '${series_title_qf}',
pf: '${series_title_pf}'
}
end

Expand Down
30 changes: 15 additions & 15 deletions app/views/catalog/_ask_a_question_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div class="modal-body">
<%= render :partial=>'shared/flash_msg' %>
<%= simple_form_for(
form,
url: contact_question_path,
data: { blacklight_modal: 'trigger' },
html: {class: "modal_form"}
) do |f|
%>
<%= render :partial=>'shared/flash_msg' %>
<%= simple_form_for(
form,
url: contact_question_path,
data: { blacklight_modal: 'trigger' },
html: {class: "modal_form"}
) do |f|
%>
<div class="modal-body">
<%= f.label :name %><br>
<%= f.input_field :name %><br>
<%= f.label :email %><br>
Expand All @@ -16,9 +16,9 @@
<%= f.input :context, as: :hidden %>
<%= f.input :title, as: :hidden %>
<%= f.input :feedback_desc, as: :hidden %>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<%= f.submit "Send", class: "btn btn-primary", id: 'submit-question' %>
</div>
<% end %>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<%= f.submit "Send", class: "btn btn-primary", id: 'submit-question' %>
</div>
<% end %>
25 changes: 12 additions & 13 deletions app/views/catalog/_report_harmful_language_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<div class="modal-body">
<%= render :partial=>'shared/flash_msg' %>
<div>
<%= render :partial=>'shared/flash_msg' %>
<%= simple_form_for(
form,
url: contact_report_harmful_language_path,
data: { blacklight_modal: 'trigger' },
html: { class: "modal_form" }
) do |f|
%>
<div class="modal-body">
<p>Princeton University Library aims to describe materials in a manner that is respectful to all individuals and communities. However, for a variety of reasons, users may encounter offensive or harmful language—for example, language that is racist, sexist, or homophobic—in our catalog.</p>

<p>Staff are currently implementing practices to address offensive or harmful language, particularly in subject headings. We recognize that terminology evolves over time and that efforts to create respectful and inclusive descriptions and subject headings must be ongoing. You can help us address this issue by reporting any <a href="https://library.princeton.edu/about/languagestatement">harmful or offensive language</a> you encounter on this site by using the form below. If you would prefer to report anonymously, you may leave the name and email fields blank.</p>
</div>
<%= simple_form_for(
form,
url: contact_report_harmful_language_path,
data: { blacklight_modal: 'trigger' },
html: { class: "modal_form" }
) do |f|
%>

<%= f.label :message %><br>
<%= f.input_field :message, as: :text, style: "width: 100%" %><br>
<%= f.label :name, style: "width: 100%", label: 'Name (optional)' %><br>
Expand All @@ -33,9 +32,9 @@
<%= f.input_field :title, hidden: true %><br>
<%= f.input_field :context, hidden: true %><br>
<%= f.input :feedback_desc, as: :hidden %>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<%= f.submit "Send", class: "btn btn-primary", id: 'submit-question' %>
</div>
<% end %>
</div>
<% end %>
30 changes: 16 additions & 14 deletions app/views/catalog/_suggest_correction_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<div class="modal-body">
<%= render :partial=>'shared/flash_msg' %>
<p>Please use this area to report errors or omissions that appear in the description of this record.</p>
<%= simple_form_for(
form,
url: contact_suggestion_path,
data: { blacklight_modal: 'trigger' },
html: { class: "modal_form" }
) do |f|
%>

<%= render :partial=>'shared/flash_msg' %>
<%= simple_form_for(
form,
url: contact_suggestion_path,
data: { blacklight_modal: 'trigger' },
html: { class: "modal_form" }
) do |f|
%>
<div class="modal-body">
<p>Please use this area to report errors or omissions that appear in the description of this record.</p>
<%= f.label :name %><br>
<%= f.input_field :name %><br>
<%= f.label :email %><br>
Expand All @@ -17,9 +18,10 @@
<%= f.input :context, as: :hidden %>
<%= f.input :title, as: :hidden %>
<%= f.input :feedback_desc, as: :hidden %>
<div class="modal-footer">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<%= f.submit "Send", class: "btn btn-primary", id: 'submit-suggestion' %>
</div>
<% end %>
</div>
</div>
<% end %>

14 changes: 14 additions & 0 deletions spec/features/advanced_searching_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,18 @@
expect(page).to have_content 'المقامات'
expect(page).to have_content 'مطول'
end

it 'gives different results for the series title search vs. keyword search' do
visit '/advanced'
select('Keyword', from: 'clause_0_field')
fill_in(id: 'clause_0_query', with: 'heft')
click_button 'Search'
expect(page).to have_content '1 - 3 of 3'

visit '/advanced'
select('Series title', from: 'clause_0_field')
fill_in(id: 'clause_0_query', with: 'heft')
click_button 'Search'
expect(page).to have_content '1 entry found'
end
end
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4363,9 +4363,9 @@ ms@^2.1.3:
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

nanoid@^3.3.7:
version "3.3.7"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
version "3.3.8"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf"
integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==

natural-compare@^1.4.0:
version "1.4.0"
Expand Down

0 comments on commit d4c218d

Please sign in to comment.