<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
  <div><?= html_entity_decode($viewDatas['currentCategory']->head) ?></div>
  <div class="top"><?= $this->include('templates/front/index_head') ?></div>
  <table class="table table-hover">
    <thead>
      <tr>
        <th>#</th>
        <?php foreach ($viewDatas['fields'] as $field) : ?><?= getFieldIndex_Column_BillingHelper($field, $viewDatas) ?><?php endforeach ?>
      </tr>
    </thead>
    <tbody>
      <?php $cnt = 0 ?>
      <?php foreach ($viewDatas['entitys'] as $entity) : ?>
        <tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)">
          <td nowrap>
            <?= $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt) ?>
          </td>
          <?php foreach ($viewDatas['fields'] as $field) : ?>
            <td><?= getFieldIndex_Row_BillingHelper($field, $entity, $viewDatas) ?></td>
          <?php endforeach ?>
        </tr>
        <?php $cnt++ ?>
      <?php endforeach ?>
    </tbody>
  </table>
  <div class="bottom">
    <?= $viewDatas['pagination'] ?>
  </div>
  <div><?= html_entity_decode($viewDatas['currentCategory']->tail) ?></div>
</div>
<?= $this->endSection() ?>