From 558e2359f7a1366a9cbe5185150e8b0a1448b150 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Wed, 19 Sep 2018 09:45:36 -0400 Subject: [PATCH] Added partial customers/search & fixed formatting --- app/views/customers/_search.html.erb | 2 -- app/views/customers/index.html.erb | 10 +--------- app/views/customers/show.html.erb | 5 ++--- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/app/views/customers/_search.html.erb b/app/views/customers/_search.html.erb index 532fa80..826382a 100644 --- a/app/views/customers/_search.html.erb +++ b/app/views/customers/_search.html.erb @@ -1,8 +1,6 @@ -
<%= form_tag(customers_path, :method => "get", id: "search-form") do %> <%= text_field_tag :search, params[:search], placeholder: "Search Customers" %> <%= submit_tag "Search" %> <% end %> <%= button_to "New Customer", new_customer_path, method: :get%> <%= button_to "Sync", qbo_sync_path, method: :get%> -
diff --git a/app/views/customers/index.html.erb b/app/views/customers/index.html.erb index 2470aa3..f561320 100644 --- a/app/views/customers/index.html.erb +++ b/app/views/customers/index.html.erb @@ -1,12 +1,4 @@ -

Customers

-
-<%= form_tag(customers_path, :method => "get", id: "search-form") do %> -<%= text_field_tag :search, params[:search], placeholder: "Search Customers" %> -<%= submit_tag "Search" %> -<% end %> -<%= button_to "New Customer", new_customer_path, method: :get%> -<%= button_to "Sync", qbo_sync_path, method: :get%> -
+

Customers <%= render :partial => 'customers/search' %>

<% if @customers.present? %>
<% @customers.each do |c| %> diff --git a/app/views/customers/show.html.erb b/app/views/customers/show.html.erb index ce718a2..ca380ef 100644 --- a/app/views/customers/show.html.erb +++ b/app/views/customers/show.html.erb @@ -1,16 +1,15 @@
-

Customer #<%= @customer.id %>

+

Customer #<%= @customer.id %> - <%= @customer.name %> <%= render :partial => 'customers/search' %>


-

<%= @customer.name %>

+

Details:

-

Details:

<%= render :partial => 'customers/details', locals: {customer: @customer} %>