Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

<div class="container">
  <div class="row">
    <div class="col-lg-12 table-responsive">
      <div class="searchbar">
        <?php echo $this->Form->create('Report');?>
        <!-- <form class="navbar-form" role="search" method="GET" name="search"> -->
              <div class="input-group col-xs-12 text-left" id="remote">
                <?php echo $this->Form->input('date',array('type'=>'date'));?>
                  <!-- <input autocomplete="off" type="text" class="form-control" placeholder="Search for url" name="q" id="srch-term" value="<?php if(isset($q)){echo $q;}?>">     -->
                  <div class="input-group-btn w25px">
                      <button class="btn btn-xs btn-default" type="submit">Submit</button>
                      <button class="btn btn-xs btn-default" type="reset" onclick="reload()">Reset</button>
                  </div>
              </div>
             <?php echo $this->Form->end();?>
            <!-- </form> -->
      </div>
    </div>    
    <div class="table-responsive">
        <table id="example" class="display table table-striped" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <th>User Id</th>
                <th>First Entry</th>                        
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <th>User Id</th>
                <th>First Entry</th>                        
                </tr>
            </tfoot>
            <tbody>
          <?php if(!empty($device_upgrades)):?>
          <?php foreach ($device_upgrades as $key => $row) :?>
                <tr>
              <td><?php echo $row['devices']['user_id'];?></td>
                        <td><?php echo ($row[0]['date']);?></td>
                </tr>
          <?php endforeach;?>
          <?php endif;?>
                  </tbody>
        </table>                
    </div>    
  </div>
</div>

<script type="text/javascript" src="//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.7/css/jquery.dataTables.css"></link>
<script type="text/javascript">
$(document).ready(function() {
    var table = $('#example').DataTable();
    table.order( [ 1, 'desc' ] ).draw();
} );
</script>