servermgrv2/app/Views/front/board/index.php
2023-08-03 17:40:47 +09:00

38 lines
1.7 KiB
PHP

<?= $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_BoardHelper($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_BoardHelper($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>
<?php if ($session->get(SESSION_NAMES['ISLOGIN']) && $entity->getUser_Uid() == $session->get(SESSION_NAMES['AUTH'])[AUTH_FIELDS['ID']]) : ?>
<?= anchor(current_url() . '/update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
<?php else : ?>
<?= $total_count - (($page - 1) * $per_page + $i) ?>
<?php endif; ?>
</td>
<?php foreach ($fields as $field) : ?>
<td nowrap><?= getFieldIndex_Row_BoardHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
<?php endforeach; ?>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</table>
<div class="bottom">
<?= $pagination ?>
</div>
</div>
<?= $this->endSection() ?>