From 43cf9587d0f191d7b0ff8f7eba0fff4dbe11d92e Mon Sep 17 00:00:00 2001 From: Greg Kostin Date: Mon, 3 Jun 2024 16:24:22 -0400 Subject: [PATCH] request button flag --- app/views/catalog/_show_default.html.erb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/views/catalog/_show_default.html.erb b/app/views/catalog/_show_default.html.erb index fc3d8ccd..ffa4e482 100644 --- a/app/views/catalog/_show_default.html.erb +++ b/app/views/catalog/_show_default.html.erb @@ -166,13 +166,17 @@ <% end %> +<% request_button_flag = true %> + <% if document.is_checkbox_requestable? %> <%= render "aeon_request_checkbox", document: document, class: 'px-0 pb-3 mt-n3 d-flex align-items-center', label_class: 'btn btn-outline-secondary btn-outline-request p-2 m-0', label: 'Select Item' %> + <% request_button_flag = false %> <% else %> - <% unless document.collection_has_requestable_components? || document.children? %> + <% unless document.collection_has_requestable_components? || (document.level == 'collection') || document.children? %>
<%= render partial: 'arclight/requests', locals: { document: document } %>
+ <% request_button_flag = false %> <% end %> <% end %> @@ -260,11 +264,13 @@

"> <%= t("arclight.views.show.sections.contents") %>

-
-
- <%= render partial: 'arclight/requests', locals: { document: document } %> + <% if request_button_flag %> +
+
+ <%= render partial: 'arclight/requests', locals: { document: document } %> +
-
+ <% end %>
<%= document.non_component_contents %>