Skip to content

Commit

Permalink
Merge pull request #712 from nla/fix/blac-541-request-prompts
Browse files Browse the repository at this point in the history
fix: change requesting prompts
  • Loading branch information
yetti authored Sep 1, 2023
2 parents 3c975e0 + 83d5818 commit 6e0f5bf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
6 changes: 4 additions & 2 deletions app/views/request/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
<div class="row mt-4 mb-4">
<% if @request_form == "manuscripts" %>
<p class="col-12 col-lg-8"><%= t("requesting.multi_box_prompt").html_safe %></p>
<p class="col-12 col-lg-8"><%= t("requesting.multi_box_prompt_2", finding_aid: @finding_aids_link, contact_us: Rails.application.config_for(:catalogue).contact_us_url).html_safe %></p>
<p class="col-12 col-lg-8"><%= t("requesting.multi_box_prompt_2") %></p>
<p class="col-12 col-lg-8"><%= t("requesting.multi_box_prompt_3", finding_aid: @finding_aids_link, contact_us: Rails.application.config_for(:catalogue).contact_us_url).html_safe %></p>
<% elsif @request_form == "serials" %>
<p class="col-12 col-lg-8"><%= t("requesting.prompt") %></p>
<p class="col-12 col-lg-8"><%= t("requesting.prompt").html_safe %></p>
<p class="col-12 col-lg-8"><%= t("requesting.prompt_2", contact_us: Rails.application.config_for(:catalogue).contact_us_url).html_safe %></p>
<% elsif @request_form == "maps" %>
<p class="col-12 col-lg-8"><%= t("requesting.map_prompt").html_safe %></p>
<% end %>
Expand Down
8 changes: 5 additions & 3 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ en:
supplements: "Supplements:"
indexes: "Indexes:"
delivery_conditions: "Delivery Conditions:"
prompt: "You have requested an issue of a journal, magazine, newspaper, annual report or other multi-part item. Please use the fields below to tell our staff which issues you would like to request."
multi_box_prompt: "<strong>You have requested a multiple box collection. Please use the fields below to tell our staff which box or boxes you would like to request.</strong> Use one request for up to five consecutive boxes. Use a separate request for non-consecutive boxes/series/folders/items."
multi_box_prompt_2: "If available, use the %{finding_aid} to select your box number, or a series/folder/item number and enter them below. If you need assistance with this please <a href=\"%{contact_us}\">contact us.</a>"
prompt: "<strong>You are requesting an issue of a journal, magazine, newspaper, annual report or other multi-part item. Please use the fields below to tell our staff which issues you would like to request.</strong>"
prompt_2: "You can use one request for consecutive parts. A separate request must be placed for non-sequential years/volumes or days/months. Requests for large amounts of material may be partially supplied. If you need assistance with this please <a href=\"%{contact_us}\">contact us.</a>"
multi_box_prompt: "<strong>You are requesting a multiple box collection. Please use the fields below to tell our staff which box or boxes you would like to request.</strong>"
multi_box_prompt_2: "You can use one request for up to five consecutive boxes. Use a separate request for non-consecutive boxes/series/folders/items."
multi_box_prompt_3: "If available, use the %{finding_aid} to select your box number, or a series/folder/item number and enter them below. If you need assistance with this please <a href=\"%{contact_us}\">contact us.</a>"
map_prompt: "<strong>You have requested a map series containing many map sheets. Please use the fields below to tell our staff which map sheet or sheets you would like to request. If you do not know which sheet, enter a place name.</strong>"
collection_finding_aid: "collection finding aid"
btn_request: "Request"
Expand Down
11 changes: 9 additions & 2 deletions spec/features/requests_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@
item: item_id
)

expect(page).to have_css("p", text: I18n.t("requesting.prompt"))
expect(page).to have_css("strong", text: "You are requesting an issue of a journal, magazine, newspaper, annual report or other multi-part item. Please use the fields below to tell our staff which issues you would like to request.")
expect(page).to have_css("p", text: "You can use one request for consecutive parts. A separate request must be placed for non-sequential years/volumes or days/months. Requests for large amounts of material may be partially supplied. If you need assistance with this please contact us.")

expect(page).to have_link(href: Rails.application.config_for(:catalogue).contact_us_url, text: "contact us")
end

it "renders the journals form" do
Expand Down Expand Up @@ -122,7 +125,11 @@
holdings: holdings_id,
item: item_id
)
expect(page).to have_css("strong", text: "You have requested a multiple box collection. Please use the fields below to tell our staff which box or boxes you would like to request.")
expect(page).to have_css("strong", text: "You are requesting a multiple box collection. Please use the fields below to tell our staff which box or boxes you would like to request.")
expect(page).to have_css("p", text: "You can use one request for up to five consecutive boxes. Use a separate request for non-consecutive boxes/series/folders/items.")
expect(page).to have_css("p", text: "If available, use the collection finding aid to select your box number, or a series/folder/item number and enter them below. If you need assistance with this please contact us.")

expect(page).to have_link(href: Rails.application.config_for(:catalogue).contact_us_url, text: "contact us")
end

it "renders the contact us link" do
Expand Down

0 comments on commit 6e0f5bf

Please sign in to comment.