Files
sx-fc/app/views/transactions/orders/index.html.erb
2017-08-08 09:43:58 +06:30

82 lines
2.6 KiB
Plaintext

<div class="row">
<div class="col-lg-12">
<ol class="breadcrumb">
<li><a href="<%= dashboard_path %>">Home</a></li>
<li class="active">
<a href="<%= transactions_orders_path %>">Order</a>
</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="main-box-body clearfix">
<%= form_tag transactions_orders_path, :method => :get do %>
<div class="form-group col-md-3">
<label>Enter Keyword</label>
<input type="text" name="filter" placeholder="Order ID" class="form-control input-md">
</div>
<div class="form-group col-md-2">
<label>Items Count</label>
<input id="number" data-id='numberRangePicker' type="range" data-min="0" data-max="20" data-step="1" data-value="14"/>
</div>
<div class="form-group col-md-2">
<label class="">From</label>
<input class="form-control datepicker" name="from" id="date" type="text" placeholder="From date">
</div>
<div class="form-group col-md-2">
<label class="">To</label>
<input class="form-control datepicker" name="to" id="date" type="text" placeholder="To date">
</div>
<div class="form-group col-md-1">
<label></label>
<input type="submit" value="Search" class='btn btn-primary btn-md'>
</div>
<% end %>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Order ID </th>
<th>Type</th>
<th>Customer</th>
<th>Order status</th>
<th>Order date</th>
<th>Items Count</th>
</tr>
</thead>
<tbody>
<% @orders.each do |order| %>
<tr>
<td><%= link_to order.order_id, transactions_order_path(order) %></td>
<td><%= order.order_type %></td>
<td><%= order.customer.name rescue '-' %></td>
<td><%= order.status %></td>
<td> <%= order.date.strftime("%d-%m-%Y") %> </td>
<td> <%= order.item_count %> </td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%if !@order.nil?%>
<%= paginate @orders %>
<%end%>
</div>
</div>
</div>
</div>