shoppingmallv2/app/Views/front/order/index.php
최준흠git config git config --helpgit config --global user.name 최준흠 77c434617c shoppingmallv2 init...
2023-08-12 16:49:08 +09:00

40 lines
1.7 KiB
PHP

<?= $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['category']->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_OrderHelper($field, $viewDatas) ?><?php endforeach ?>
<th>@</th>
</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_OrderHelper($field, $entity, $viewDatas) ?></td>
<?php endforeach ?>
<td>
<?php if ($entity->status == DEFAULTS['STATUS']) : ?>
<?= anchor(current_url() . '/delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?>
<?php endif ?>
</td>
</tr>
<?php $cnt++ ?>
<?php endforeach ?>
</tbody>
</table>
<div class="bottom"><?= $viewDatas['pagination'] ?></div>
<div><?= html_entity_decode($viewDatas['category']->tail) ?></div>
</div>
<?= $this->endSection() ?>