From 5f6fb4af27504efbff3b1dfd903f7640fa18906c Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 22 Jan 2026 21:29:08 -0500 Subject: [PATCH] Only show select all when more than one invoice --- app/views/invoices/_list.html.erb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/views/invoices/_list.html.erb b/app/views/invoices/_list.html.erb index 6b58174..775514c 100644 --- a/app/views/invoices/_list.html.erb +++ b/app/views/invoices/_list.html.erb @@ -2,12 +2,14 @@ <%= form_with(url: invoice_path, method: :get) do |form| %> -
- <%= check_box_tag "select-all-invoices", "1", false, id: "select-all-invoices" %> - <%= label_tag "select-all-invoices", t(:label_select_all) %> -
+ <% if @customer.invoices.count > 1 %> +
+ <%= check_box_tag "select-all-invoices", "1", false, id: "select-all-invoices" %> + <%= label_tag "select-all-invoices", t(:label_select_all) %> +
-
+
+ <% end %> <% @customer.invoices.order(id: :desc).each do |invoice| %>
@@ -16,7 +18,9 @@
<% end %> - <%= form.submit t(:button_bulk_pdf) %> + <% if @customer.invoices.count > 1 %> + <%= form.submit t(:button_bulk_pdf) %> + <% end %> <% end %> <% else %>