<nav class="large-3 medium-4 columns" id="actions-sidebar">
      <?= $this->element('admin_sidebar') ?>
</nav>
<div class="customers index large-9 medium-8 columns content">
<div class="col-md-3">
    <h3><?= __('Customers') ?></h3></div>

     <!--<div class="btn-link"><?= $this->Html->link(__('Add Customer'), ['action' => 'add'],['class' => 'green-btn']) ?></div>-->
     <!--<div class="search-wrapper">
        <div class="search-filter">
		<div class="mul">

		<?= $this->Search->filterForm($searchFilters) ?></div> </div>        
    </div>-->
<div class="col-md-9">
    <div class="search-wrapper">
        <div class="search-filter"><?= $this->Search->filterForm($searchFilters) ?></div>         
    </div></div>
    <table cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <th style="width:40px;" scope="col"><?= $this->Paginator->sort('Sr No') ?></th>
                <!--<th scope="col"><?= $this->Paginator->sort('accountno') ?></th>-->
                <th scope="col"><?= $this->Paginator->sort('firstname') ?></th>
               <!-- <th scope="col"><?= $this->Paginator->sort('lastname') ?></th>-->
               <!-- <th scope="col"><?= $this->Paginator->sort('dob') ?></th>-->
                <th scope="col"><?= $this->Paginator->sort('panno') ?></th>
               <!-- <th scope="col"><?= $this->Paginator->sort('email') ?></th>-->
              <!--  <th scope="col"><?= $this->Paginator->sort('gender') ?></th>-->
              <!--  <th scope="col"><?= $this->Paginator->sort('address') ?></th>-->
              <!--  <th scope="col"><?= $this->Paginator->sort('City') ?></th>-->
              <!--  <th scope="col"><?= $this->Paginator->sort('State') ?></th>-->
              <!--  <th scope="col"><?= $this->Paginator->sort('Country') ?></th>-->
              <!--  <th scope="col"><?= $this->Paginator->sort('Zipcode') ?></th>-->
              <!--  <th scope="col"><?= $this->Paginator->sort('phoneno') ?></th>-->
              <!--  <th scope="col"><?= $this->Paginator->sort('company_id') ?></th>-->
              <!--  <th scope="col"><?= $this->Paginator->sort('branch_id') ?></th>-->
              <!--  <th scope="col"><?= $this->Paginator->sort('created') ?></th>-->
             <!--   <th scope="col"><?= $this->Paginator->sort('modified') ?></th>-->
                <th scope="col" class="actions"><?= __('Actions') ?></th>
            </tr>
        </thead>
        <tbody>
            <?php   $srlno = ($this->request->params['paging']['Customers']['page']-1) * $this->request->params['paging']['Customers']['perPage'];
            $j=1;
            foreach ($customers as $customer): $srlno++; ?>
            <tr>
                <td><?= $srlno ?></td>
                <!--<td><?= h($customer->accountno) ?></td>-->
                <td><?= h($customer->firstname) ?></td>
              <!--  <td><?= h($customer->lastname) ?></td>-->
              <!--  <td><?= h($customer->dob) ?></td>-->
                <td><?= h($customer->panno) ?></td>
             <!--   <td><?= h($customer->email) ?></td>-->
              <!--  <td><?= h($customer->gender) ?></td>-->
              <!--  <td><?= h($customer->address) ?></td>-->
              <!--  <td><?= h($customer->City) ?></td>-->
              <!--  <td><?= h($customer->State) ?></td>-->
               <!-- <td><?= h($customer->Country) ?></td>-->
              <!--  <td><?= h($customer->Zipcode) ?></td>-->
              <!--  <td><?= $this->Number->format($customer->phoneno) ?></td>-->
                
             <!--<td><?= $customer->has('company') ? $this->Html->link($customer->company->company, ['controller' => 'Companies', 'action' => 'view', $customer->company->id]) : '' ?></td>-->
             <!--<td><?= $customer->has('branch') ? $this->Html->link($customer->branch->branchname, ['controller' => 'Branches', 'action' => 'view', $customer->branch->id]) : '' ?></td>-->
              <!--  <td><?= h($customer->created) ?></td>-->
               <!-- <td><?= h($customer->modified) ?></td>-->
                <td class="actions">
                    <!--<?= $this->Html->link(__('View'), ['action' => 'view', $customer->id],['class' => 'view']) ?>-->
                    <?= $this->Html->link(__('Edit'), ['action' => 'edit', $customer->id],['class' => 'edit']) ?>
                   <!-- <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $customer->id],['class' => 'delete'], ['confirm' => __('Are you sure you want to delete # {0}?', $customer->id)]) ?>-->
                </td>
            </tr>
            <?php $j++;
            endforeach; ?>
        </tbody>
    </table>
<div class="btn-link"><input type="button" value="Back" onclick="window.history.back()" class="green-btn" /> </div>
    <div class="paginator">
        <ul class="pagination">
           <?= $this->Paginator->first(__('First', true), array('class' => 'disabled')); ?>
            <?= $this->Paginator->prev('< ' . __('previous',true), array('class' => 'disabled')) ?>
            <?= $this->Paginator->numbers() ?>
            <?= $this->Paginator->next(__('next' . ' >',true), array('class' => 'disabled')) ?>
		 <?=  $this->Paginator->last(__('Last', true), array('class' => 'disabled')); ?>
        </ul>
        <p><?= $this->Paginator->counter() ?></p>
    </div>
</div>
<script type="text/javascript">
    var availableTags = <?=json_encode($custname)?>;
    //console.log(availableTags);
    $( "#autocomplete1" ).autocomplete({
        //source: availableTags,
        source: function(request, response) {
            var results = $.ui.autocomplete.filter(availableTags, request.term);

            response(results.slice(0, 10));
        }
    });
</script>