Merge branch 'crm'

This commit is contained in:
Aung Myo
2017-06-13 20:13:01 +06:30
6 changed files with 61 additions and 40 deletions

View File

@@ -14,7 +14,7 @@
<div class="row">
<div class="col-lg-8">
<div class="col-lg-7 col-md-7 col-sm-7">
<div class="main-box-body clearfix">
<div class="table-responsive">
@@ -42,20 +42,21 @@
</thead>
<tbody>
<% @crm_customers.each do |crm_customer| %>
<tr>
<td>
<input type="radio" style="width:20px;" value="<%= crm_customer.customer_id %>" name="checkbox" class="checkbox_check" ></td>
<td><%= crm_customer.name %></td>
<td><%= crm_customer.company %></td>
<td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td>
<td>
<%= link_to 'Show', crm_customer_path(crm_customer) %>
</td>
</tr>
<% if @crm_customers.count > 0 %>
<% @crm_customers.each do |crm_customer| %>
<tr>
<td>
<input type="radio" style="width:20px;" value="<%= crm_customer.customer_id %>" name="checkbox" class="checkbox_check" ></td>
<td><%= crm_customer.name %></td>
<td><%= crm_customer.company rescue '-' %></td>
<td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td>
<td><%= link_to 'Show', crm_customer_path(crm_customer) %></td>
</tr>
<% end %>
<%else%>
<tr><td colspan="5"><p style="text-align:center"><strong>There are no record for your search</strong></p></td></tr>
<% end %>
</tbody>
</table>
@@ -66,7 +67,7 @@
</div>
</div>
<div class="col-lg-4">
<div class="col-lg-4 col-md-4 col-sm-4">
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
@@ -115,6 +116,11 @@
</div>
<%end%>
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<a href="<%= crm_customers_path%>" class="btn btn-primary btn-lg ">
Back
</a>
</div>
</div>
@@ -216,7 +222,4 @@ $(function() {
}
</script>

View File

@@ -21,7 +21,7 @@
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
<% if !flash["errors"]%>
<%=message%>
<%=message%>
<% end %>
</div>
<% end %>

View File

@@ -24,7 +24,8 @@
<tr>
<td colspan="6">
<%= form_tag crm_customers_path, :method => :get do %>
<% path ="/origami/#{@sale_id}/customers" %>
<%= form_tag path, :method => :get do %>
<div class="input-append form-group pull-left">
<input type="text" name="filter" placeholder="Search" class="form-control input-sm col-md-8">
<button type="submit" class="btn btn-primary btn-sm">Search</button>
@@ -42,17 +43,21 @@
</thead>
<tbody>
<% @crm_customers.each do |crm_customer| %>
<tr>
<td>
<input type="radio" style="width:20px;" value="<%= crm_customer.customer_id %>" name="checkbox" class="checkbox_check" ></td>
<td><%= crm_customer.name %></td>
<td><%= crm_customer.company rescue '-' %></td>
<td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td>
</tr>
<% if @crm_customers.count > 0 %>
<% @crm_customers.each do |crm_customer| %>
<tr>
<td>
<input type="radio" style="width:20px;" value="<%= crm_customer.customer_id %>" name="checkbox" class="checkbox_check" ></td>
<td><%= crm_customer.name %></td>
<td><%= crm_customer.company rescue '-' %></td>
<td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td>
</tr>
<% end %>
<%else%>
<tr><td colspan="5"><p style="text-align:center"><strong>There are no record for your search</strong></p></td></tr>
<% end %>
</tbody>
</table>