shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

customer_search_info.twig (6131B)


      1 <div class="row">
      2   <div id="filter-report" class="col-md-3 col-md-push-9 col-sm-12 hidden-sm hidden-xs">
      3     <div class="panel panel-default">
      4       <div class="panel-heading">
      5         <h3 class="panel-title"><i class="fa fa-filter"></i> {{ text_filter }}</h3>
      6       </div>
      7       <div class="panel-body">
      8         <div class="form-group">
      9           <label class="control-label" for="input-date-start">{{ entry_date_start }}</label>
     10           <div class="input-group date">
     11             <input type="text" name="filter_date_start" value="{{ filter_date_start }}" placeholder="{{ entry_date_start }}" data-date-format="YYYY-MM-DD" id="input-date-start" class="form-control" />
     12             <span class="input-group-btn">
     13             <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
     14             </span></div>
     15         </div>
     16         <div class="form-group">
     17           <label class="control-label" for="input-customer">{{ entry_customer }}</label>
     18           <input type="text" name="filter_customer" value="{{ filter_customer }}" placeholder="{{ entry_customer }}" id="input-customer" class="form-control" />
     19         </div>
     20         <div class="form-group">
     21           <label class="control-label" for="input-date-end">{{ entry_date_end }}</label>
     22           <div class="input-group date">
     23             <input type="text" name="filter_date_end" value="{{ filter_date_end }}" placeholder="{{ entry_date_end }}" data-date-format="YYYY-MM-DD" id="input-date-end" class="form-control" />
     24             <span class="input-group-btn">
     25             <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
     26             </span></div>
     27         </div>
     28         <div class="form-group">
     29           <label class="control-label" for="input-ip">{{ entry_ip }}</label>
     30           <input type="text" name="filter_ip" value="{{ filter_ip }}" placeholder="{{ entry_ip }}" id="input-ip" class="form-control" />
     31         </div>
     32         <div class="form-group">
     33           <label class="control-label" for="input-keyword">{{ entry_keyword }}</label>
     34           <input type="text" name="filter_keyword" value="{{ filter_keyword }}" placeholder="{{ entry_keyword }}" id="input-keyword" class="form-control" />
     35         </div>
     36         <div class="form-group text-right">
     37           <button type="button" id="button-filter" class="btn btn-default"><i class="fa fa-filter"></i> {{ button_filter }}</button>
     38         </div>
     39       </div>
     40     </div>
     41   </div>
     42   <div class="col-md-9 col-md-pull-3 col-sm-12">
     43     <div class="panel panel-default">
     44       <div class="panel-heading">
     45         <h3 class="panel-title"><i class="fa fa-bar-chart"></i> {{ heading_title }}</h3>
     46       </div>
     47       <div class="panel-body">
     48         <div class="table-responsive">
     49           <table class="table table-bordered">
     50             <thead>
     51               <tr>
     52                 <td class="text-left">{{ column_keyword }}</td>
     53                 <td class="text-left">{{ column_products }}</td>
     54                 <td class="text-left">{{ column_category }}</td>
     55                 <td class="text-left">{{ column_customer }}</td>
     56                 <td class="text-left">{{ column_ip }}</td>
     57                 <td class="text-left">{{ column_date_added }}</td>
     58               </tr>
     59             </thead>
     60             <tbody>
     61             
     62             {% if searches %}
     63             {% for search in searches %}
     64             <tr>
     65               <td class="text-left">{{ search.keyword }}</td>
     66               <td class="text-left">{{ search.products }}</td>
     67               <td class="text-left">{{ search.category }}</td>
     68               <td class="text-left">{{ search.customer }}</td>
     69               <td class="text-left">{{ search.ip }}</td>
     70               <td class="text-left">{{ search.date_added }}</td>
     71             </tr>
     72             {% endfor %}
     73             {% else %}
     74             <tr>
     75               <td class="text-center" colspan="6">{{ text_no_results }}</td>
     76             </tr>
     77             {% endif %}
     78             </tbody>
     79             
     80           </table>
     81         </div>
     82         <div class="row">
     83           <div class="col-sm-6 text-left">{{ pagination }}</div>
     84           <div class="col-sm-6 text-right">{{ results }}</div>
     85         </div>
     86       </div>
     87     </div>
     88   </div>
     89 </div>
     90 <script type="text/javascript"><!--
     91 $('#button-filter').on('click', function() {
     92 	var url = '';
     93 	
     94 	var filter_date_start = $('input[name=\'filter_date_start\']').val();
     95 	
     96 	if (filter_date_start) {
     97 		url += '&filter_date_start=' + encodeURIComponent(filter_date_start);
     98 	}
     99 	
    100 	var filter_date_end = $('input[name=\'filter_date_end\']').val();
    101 	
    102 	if (filter_date_end) {
    103 		url += '&filter_date_end=' + encodeURIComponent(filter_date_end);
    104 	}
    105 	
    106 	var filter_keyword = $('input[name=\'filter_keyword\']').val();
    107 	
    108 	if (filter_keyword) {
    109 		url += '&filter_keyword=' + encodeURIComponent(filter_keyword);
    110 	}
    111 	
    112 	var filter_customer = $('input[name=\'filter_customer\']').val();
    113 	
    114 	if (filter_customer) {
    115 		url += '&filter_customer=' + encodeURIComponent(filter_customer);
    116 	}
    117 	
    118 	var filter_ip = $('input[name=\'filter_ip\']').val();
    119 	
    120 	if (filter_ip) {
    121 		url += '&filter_ip=' + encodeURIComponent(filter_ip);
    122 	}
    123 	
    124 	location = 'index.php?route=report/report&code=customer_search&user_token={{ user_token }}' + url;
    125 });
    126 //--></script> 
    127 <script type="text/javascript"><!--
    128 $('.date').datetimepicker({
    129 	language: '{{ datepicker }}',
    130 	pickTime: false
    131 });
    132 //--></script> 
    133 <script type="text/javascript"><!--
    134 $('input[name=\'filter_customer\']').autocomplete({
    135 	'source': function(request, response) {
    136 		$.ajax({
    137 			url: 'index.php?route=customer/customer/autocomplete&user_token={{ user_token }}&filter_name=' +  encodeURIComponent(request),
    138 			dataType: 'json',
    139 			success: function(json) {
    140 				response($.map(json, function(item) {
    141 					return {
    142 						label: item['name'],
    143 						value: item['customer_id']
    144 					}
    145 				}));
    146 			}
    147 		});
    148 	},
    149 	'select': function(item) {
    150 		$('input[name=\'filter_customer\']').val(item['label']);
    151 	}
    152 });
    153 //--></script>