<?= $this->extend($viewDatas['layout']['layout']) ?>
<?= $this->section('content') ?>
<table class="layout_middle">
  <tr>
    <td class="layout_right">
      <div class="layout_header"><?= $this->include("{$viewDatas['layout']['template']}/popup/index_header"); ?></div>
      <div id="container" class="layout_content">
        <link href="/css/<?= $viewDatas['layout']['path'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
        <div class="index_body">
          <?= $this->include("{$viewDatas['layout']['template']}/popup/index_content_filter"); ?>
          <?= form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
          <table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
            <thead>
              <tr>
                <th class="text-center bg-light">번호</th>
                <?php foreach ($viewDatas['formFields'] as $field => $label): ?>
                  <th class="text-center bg-light"><?= $viewDatas['helper']->getListLabel($field, $label, $viewDatas) ?></th>
                <?php endforeach ?>
                <th class="text-center bg-light">작업</th>
              </tr>
            </thead>
            <tbody>
              <?php $cnt = 0 ?>
              <?php foreach ($viewDatas['entities'] as $entity): ?>
                <?php
                $viewDatas['entity'] = $entity;
                $num = $viewDatas['index_totalcount'] - (($viewDatas['page'] - 1) * $viewDatas['perpage'] + $cnt);
                ?>
                <tr>
                  <td nowrap><?= $viewDatas['helper']->getListButton('modify', $num, $viewDatas) ?></td>
                  <?php foreach ($viewDatas['formFields'] as $field => $label): ?><td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td><?php endforeach ?>
                  <td nowrap>
                    <?php foreach ($viewDatas['index_actionButtons'] as $action => $label): ?>
                      <?= $viewDatas['helper']->getListButton($action, $label, $viewDatas) ?>&nbsp;
                    <?php endforeach ?>
                  </td>
                </tr>
                <?php $cnt++ ?>
              <?php endforeach ?>
            </tbody>
          </table>
          <?= $this->include("{$viewDatas['layout']['template']}/index_content_bottom"); ?>
          <?= form_close() ?>
        </div>
      </div>
      <div class="layout_footer"><?= $this->include("{$viewDatas['layout']['template']}/index_footer"); ?></div>
    </td>
  </tr>
</table>
<?= $this->endSection() ?>