<script language="javascript" type="text/javascript">
  var modulo = 'cms_log';
</script>
<?php
  $modulo = 'cms_log';
?>
<div class="row-fluid">
  <div class="span12 btn-inverse div-top-borded">
    Logs
    <form class="search-query pull-right" method="get" action="<?=$this->linkTo($modulo, "list");?>">
      <input type="text" class="search-query" placeholder="Search" name="s" value="<? if(!empty($this->filters['s'])) { echo $this->filters['s']; }?>"/>
      <button type="submit" class="btn">Go</button>
      <? if(!empty($this->filters['s'])): ?>
      <input type="button" class="btn" value="clear" onclick="window.location.href = '<?=$this->linkTo($modulo, "list");?>'"/>
      <? endif; ?>
    </form>
  </div>
</div>
<div class="row-fluid">
  <table class="table table-striped">
    <thead>
    <tr>
      <th width="5">&nbsp;</th>
      <th class="">User</th>
      <th width="">Date</th>
      <th class="tc" width="110">Actions</th>
    </tr>
    </thead>
    <tbody>
      <? if(count($this->items) === 0): ?>
      <tr class="first">
        <td colspan="5">No records found</td>
      </tr>
      <? endif; ?>
      <? foreach($this->items as $item):?>
      <tr class="first order" id="tr-<?= $item->id; ?>">
        <td class="updown">&nbsp;</td>
        <td><a href="<?=$this->linkTo($modulo, "view", array("id" => $item->id));?>" title="edit"><?=$item->user;?></a></td>
        <td><?=date("d/F/Y", Pampa_Util_Date::getTimestamp($item->date_ins));?></td>
        <td class="tc">
          <ul class="actions">
            <li><a class="ico" href="<?=$this->linkTo("cms_log", "view", array("id" => $item->id));?>" title="view"><img src="css/img/led-ico/find.png" alt="view" /></a></li>
          </ul>
        </td>
      </tr>
      <? endforeach; ?>
    </tbody>
  </table>
</div>
<div class="row-fluid">
  <!-- pagination -->
  <?=$this->paginationControl($this->items, null, '_paginator.phtml', array("filters" => $this->filters));?>
</div>
