Skip to content

Commit

Permalink
Merge pull request #2446 from sul-dlss/page-titles
Browse files Browse the repository at this point in the history
Add some page titles to the patron requests
  • Loading branch information
dnoneill authored May 13, 2024
2 parents f5e7285 + 0ff59ff commit 54d4e1b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/views/layouts/application_new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="description" content="Stanford University Libraries' application to request materials" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">

<title><%= yield(:page_title).blank? ? SULRequests::Application.config.application_name : yield(:page_title)%></title>
<title><%= yield(:page_title).blank? ? t('shared.default_page_title') : yield(:page_title) %></title>
<%= favicon_link_tag 'favicon.ico' %>
<%= stylesheet_link_tag "application_redesign" %>
<%= stylesheet_link_tag "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700" %>
Expand Down
2 changes: 2 additions & 0 deletions app/views/patron_requests/login.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :page_title do %>Request: <%= @patron_request.item_title %><% end %>

<h1 class="fw-semibold my-3">
<%= @patron_request.item_title %>
</h1>
Expand Down
2 changes: 2 additions & 0 deletions app/views/patron_requests/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :page_title do %>Request: <%= @patron_request.item_title %><% end %>

<% unless current_user&.patron&.blank? %>
<%= render 'user_header' %>
<% end %>
Expand Down
7 changes: 4 additions & 3 deletions app/views/patron_requests/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<%= render 'confirmation_screen' %>
<% content_for :page_title do %>Request confirmation: <%= @patron_request.item_title %><% end %>

<%= render 'confirmation_screen' %>

<% if can? :debug, @patron_request %>
<hr />
<% if current_request.folio_responses.present? %>
<h4>ILS Response</h4>
<pre class="card p-2"><%= JSON.pretty_generate(current_request.folio_responses || {}) %></pre>
<pre class="card p-2"><%= JSON.pretty_generate(@patron_request.folio_responses || {}) %></pre>
<% end %>

<% if current_request.illiad_response_data.present? %>
<h4>Illiad Response</h4>
<pre class="card p-2"><%= JSON.pretty_generate(current_request.illiad_response_data) %></pre>
<pre class="card p-2"><%= JSON.pretty_generate(@patron_request.illiad_response_data) %></pre>
<% end %>
<% end %>
2 changes: 2 additions & 0 deletions app/views/patron_requests/unauthorized.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :page_title do %>Request: <%= @patron_request.item_title %><% end %>

<% if current_user&.patron %> <%= render 'user_header' %> <% end %>

<h1 class="fw-semibold mt-4"><%= @patron_request.item_title %></h1>
Expand Down
3 changes: 2 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ en:
one: "Select an item from the list above."
other: "Select one or more items from the list above."
shared:
default_page_title: "Requests : Stanford Libraries"
sul_header:
sul: Stanford University Libraries
sul: Stanford Libraries
login: Login
logout: "%{sunetid}: Logout"
mylibrary: My Account
Expand Down
2 changes: 1 addition & 1 deletion spec/features/home_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
end

it 'renders the page' do
expect(page).to have_title('SUL Requests')
expect(page).to have_title('Requests : Stanford Libraries')
expect(page).to have_css('.sul-logo')
expect(page).to have_link('My Account')
expect(page).to have_link('Feedback')
Expand Down

0 comments on commit 54d4e1b

Please sign in to comment.