Skip to content

Commit

Permalink
Use modal view component to render header
Browse files Browse the repository at this point in the history
  • Loading branch information
nomadicoder committed May 28, 2024
1 parent 88c3aac commit 8244380
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
4 changes: 3 additions & 1 deletion app/assets/stylesheets/tucob.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ img {
/* === MODALS === */

.modal-title {
font-size: 1.4rem;
font-family: Roboto;
font-size: 1.5rem;
}

.modal-content #login {
Expand Down Expand Up @@ -298,3 +299,4 @@ img {
// color: #0f0 !important;
// outline: solid #f00 1px !important;
// }

10 changes: 4 additions & 6 deletions app/views/almaws/request_options.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<div class="modal-header request-options-header justify-space-between">
<h1 id="modal-title"><%= t("requests.header") %></h1>
<button type="button" class="blacklight-modal-close btn-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
<span aria-hidden="true" class="visually-hidden">&times;</span>
</button>
</div>
<%= render Blacklight::System::ModalComponent.new do |component| %>
<% component.with_title { t("requests.header") } %>

<div class="modal-body">

Expand Down Expand Up @@ -31,3 +27,5 @@
</p>
<% end %>
</div>

<% end %>
12 changes: 4 additions & 8 deletions app/views/catalog/purchase_order.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<% doc_presenter = show_presenter(@document) %>

<div class="modal-header">
<h1 class="modal-title">Request Rapid Access</h1>
<%= render Blacklight::System::ModalComponent.new do |component| %>
<% component.with_title { t("purchase_order.header") } %>
<button type="button" class="blacklight-modal-close btn-close close" data-target="cancel" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
<span aria-hidden="true" class="visually-hidden">&times;</span>
</button>
</div>
<% doc_presenter = show_presenter(@document) %>
<%= form_tag url_for(:controller => controller_name, :action => "purchase_order_action"), :id => "purchase_order_form", :class => "form-horizontal ajax_form", :method => :post do %>

Expand Down Expand Up @@ -40,3 +35,4 @@
<button type="submit" class="btn btn-primary">Request</button>
</div>
<% end %>
<% end %>
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ en:
creator: "You are viewing related items by the first author/creator listed in this record. This is sorted by the most recently published items."
online_only: "Library use only items cannot be taken out of the library. These items must be used in the building."
purchase_order:
header: "Request Rapid Access"
purchase_order_allowed: "This ebook is available by request. This request option is limited to Temple University students, faculty, and staff. Once you submit the request, access is generally granted within 2 business days."
purchase_order_text_1: "Please submit this form to request access to the following ebook:"
purchase_order_text_2: "Access is generally granted within 2 business days. You will receive an email notification when the title is available for use."
Expand Down

0 comments on commit 8244380

Please sign in to comment.