diff --git a/blacklight-cornell/app/views/aeon/_aeon_scan_body.html.erb b/blacklight-cornell/app/views/aeon/_aeon_scan_body.html.erb index 93cc4ecee..cd19a500c 100644 --- a/blacklight-cornell/app/views/aeon/_aeon_scan_body.html.erb +++ b/blacklight-cornell/app/views/aeon/_aeon_scan_body.html.erb @@ -12,16 +12,7 @@ - - <% holdings = JSON.parse(@document['holdings_json']) %> - <% show_rmc_options = true %> - <% holdings.each do |_, holding| %> - <% location = holding['location'] %> - <% if location && (location['code'].downcase.include?('kheel') || location['name'].downcase.include?('kheel')) %> - <% show_rmc_options = false %> - <% break %> - <% end %> - <% end %> + <% if show_rmc_options %> diff --git a/blacklight-cornell/app/views/aeon/reading_room_request.html.erb b/blacklight-cornell/app/views/aeon/reading_room_request.html.erb index 4a87172f6..1f262d841 100644 --- a/blacklight-cornell/app/views/aeon/reading_room_request.html.erb +++ b/blacklight-cornell/app/views/aeon/reading_room_request.html.erb @@ -63,9 +63,19 @@ <% @form_source = @form_source.include?("aeon") ? "aeon" : @form_source.include?("nonshib") ? "nonshib" : @form_source %> + + <% rmc_site = true %> + <% holdings.each do |_, holding| %> + <% location = holding['location'] %> + <% if location && (location['code'].downcase.include?('kheel') || location['name'].downcase.include?('kheel')) %> + <% rmc_site = false %> + <% break %> + <% end %> + <% end %>
<%= hidden_field_tag :authenticity_token, form_authenticity_token -%> + diff --git a/blacklight-cornell/app/views/aeon/scan_aeon.html.erb b/blacklight-cornell/app/views/aeon/scan_aeon.html.erb index b700c282a..b1c425073 100644 --- a/blacklight-cornell/app/views/aeon/scan_aeon.html.erb +++ b/blacklight-cornell/app/views/aeon/scan_aeon.html.erb @@ -66,7 +66,15 @@ <% @form_source = @form_source.include?("aeon") ? "aeon" : @form_source.include?("nonshib") ? "nonshib" : @form_source %> - + <% holdings = JSON.parse(@document['holdings_json']) %> + <% rmc_site = true %> + <% holdings.each do |_, holding| %> + <% location = holding['location'] %> + <% if location && (location['code'].downcase.include?('kheel') || location['name'].downcase.include?('kheel')) %> + <% rmc_site = false %> + <% break %> + <% end %> + <% end %> <%= hidden_field_tag :authenticity_token, form_authenticity_token -%> @@ -78,6 +86,7 @@ + @@ -91,7 +100,7 @@ <%= render :partial => 'aeon/holdings' %> - <%= render :partial => 'aeon/aeon_scan_body' %> + <%= render :partial => 'aeon/aeon_scan_body', locals: { show_rmc_options: rmc_site } %> <%= render :partial => 'aeon/clearer' %>
diff --git a/blacklight-cornell/app/views/catalog/_show_metadata.html.erb b/blacklight-cornell/app/views/catalog/_show_metadata.html.erb index 14aedbf57..66d244a55 100644 --- a/blacklight-cornell/app/views/catalog/_show_metadata.html.erb +++ b/blacklight-cornell/app/views/catalog/_show_metadata.html.erb @@ -224,8 +224,7 @@ <% if holdings[k]["active"].nil? or holdings[k]["active"] == true %> <% if holding["location"].present? %> - <% if holding["location"]["name"].include?('Rare') %> - <%# || holding["location"]["name"].include?('Kheel') %> + <% if holding["location"]["name"].include?('Rare') || holding["location"]["name"].include?('Kheel') %> <% rare_items << holding %> <% else %> <% circulating_items << holding %>