Files
redmine_qbo/app/views/customers/index.html.erb
2016-07-28 20:48:34 -04:00

32 lines
728 B
Plaintext

<h1>Customers</h1>
<br/>
<%= form_tag(customers_path, :method => "get", id: "search-form") do %>
<%= text_field_tag :search, params[:search], placeholder: "Search Customers" %>
<%= submit_tag "Search" %>
<% end %>
<br/>
<% if @customers.present? %>
<br/>
<% @customers.each do |c| %>
<div class="row">
<div class="span6 columns">
<fieldset>
<%= c.name %>
<%= button_to "Show", customer_path(c.id), method: :get %>
</fieldset>
</div>
</div>
<% end %>
<% else %>
<p>There are no posts containing the term(s) <%= params[:search] %>.</p>
<% end %>
<br/>
<div class="actions">
<%= will_paginate @customers %>
<%= button_to "New", new_customer_path, method: :get %>
</div>