From fe06fccacd52527b5accddd2f6983c3b83af9830 Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Sun, 6 Mar 2022 16:49:07 -0500 Subject: [PATCH] Only show sync button if User is an admin --- app/views/customers/_search.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/customers/_search.html.erb b/app/views/customers/_search.html.erb index e2b9d74..88c3e59 100644 --- a/app/views/customers/_search.html.erb +++ b/app/views/customers/_search.html.erb @@ -1,6 +1,6 @@ <%= form_tag(customers_path, :method => "get", id: "search-form") do %> -<%= text_field_tag :search, params[:search], placeholder: t(:label_search_customers), :autocomplete => "off" %> -<%= submit_tag t(:label_search) %> + <%= text_field_tag :search, params[:search], placeholder: t(:label_search_customers), :autocomplete => "off" %> + <%= submit_tag t(:label_search) %> <% end %> <%= button_to t(:label_new_customer), new_customer_path, method: :get%> -<%= button_to t(:label_sync), qbo_sync_path, method: :get%> +<%= button_to(t(:label_sync), qbo_sync_path, method: :get) if User.current.admin?%>