<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<div class="content">
  <div class="top">
    <?= form_open(current_url(), array("method" => "get")) ?>
    <ul class="nav">
      조건검색:<?php foreach ($fieldFilters as $field) : ?><li class="nav-item"><?= getFieldFilter_ProductHelper($field, $$field, $fieldFormOptions) ?></li><?php endforeach; ?>
    <?= $this->include('templates/front/index_head'); ?>
    </ul>
    <?= form_close(); ?>
  </div>
  <table class="table table-bordered table-hover table-striped">
    <tr>
      <th>번호</th>
      <?php foreach ($fields as $field) : ?><th><?= getFieldIndex_Column_ProductHelper($field, $order_field, $order_value) ?></th><?php endforeach; ?>
    </tr>
    <?php $i = 0; ?>
    <?php foreach ($entitys as $entity) : ?>
      <tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);">
        <td>
          <?= $total_count - (($page - 1) * $per_page + $i) ?>
        </td>
        <?php foreach ($fields as $field) : ?>
          <td nowrap><?= getFieldView_ProductHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
        <?php endforeach; ?>
      </tr>
      <?php $i++; ?>
    <?php endforeach; ?>
  </table>
  <div class="bottom">
    <?= $pagination ?>
  </div>
</div>
<?= $this->endSection() ?>