103 lines
4.7 KiB
PHP
103 lines
4.7 KiB
PHP
<?= $this->extend("layouts/{$viewDatas['layout']}") ?>
|
|
<?= $this->section('content') ?>
|
|
<link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
|
|
<link href="/css/common/resizeTable.css" media="screen" rel="stylesheet" type="text/css" />
|
|
<?= form_open(current_url(), array("method" => "get")) ?>
|
|
<nav class="index_top navbar navbar-expand-lg">
|
|
<div class="container-fluid">
|
|
<nav class="condition nav">
|
|
조건검색:
|
|
<?php foreach ($viewDatas['filter_fields'] as $field): ?>
|
|
<?= $viewDatas['helper']->getFieldForm($field, $viewDatas[$field] ?: old($field), $viewDatas) ?>
|
|
<?php endforeach ?>
|
|
</nav>
|
|
<nav class="search nav justify-content-center">
|
|
검색어:<?= form_input('word', $viewDatas['word']) ?>
|
|
검색일:<?= form_input('start', $viewDatas['start'], ["class" => "calender"]) ?><?= form_input('end', $viewDatas['end'], ["class" => "calender"]) ?>
|
|
<?= form_submit('', '검색하기') ?>
|
|
<?= anchor(current_url() . '/download/excel', ICONS['EXCEL'], ["target" => "_self", "class" => "excel"]) ?>
|
|
</nav>
|
|
<nav class="pageinfo nav justify-content-end">
|
|
페이지 : <?= $viewDatas['page'] ?>/<?= $viewDatas['total_page'] ?>
|
|
<?= form_dropdown('per_page', $viewDatas['page_options'], $viewDatas['per_page'], array('onChange' => 'this.form.submit()')) ?>
|
|
/ 총:<?= $viewDatas['total_count'] ?>
|
|
</nav>
|
|
</div>
|
|
</nav>
|
|
<?= form_close() ?>
|
|
<div class="index_body">
|
|
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
|
|
<thead>
|
|
<tr>
|
|
<th class="index_head_short_column">번호</th>
|
|
<?php foreach ($viewDatas['fields'] as $field): ?>
|
|
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, $viewDatas) ?></th>
|
|
<?php endforeach ?>
|
|
<th class="index_head_short_column">작업</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php $cnt = 0 ?>
|
|
<?php foreach ($viewDatas['entitys'] as $entity): ?>
|
|
<tr <?= $viewDatas['helper']->getListRowColor($entity) ?>>
|
|
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
|
|
<?php $viewDatas['entity'] = $entity; ?>
|
|
<td>
|
|
<?= $viewDatas['helper']->getListButton('modify', $viewDatas) ?>
|
|
</td>
|
|
<?php foreach ($viewDatas['fields'] as $field): ?>
|
|
<td><?= $viewDatas['helper']->getFieldView($field, $viewDatas) ?></td>
|
|
<?php endforeach ?>
|
|
<td>
|
|
<?= $viewDatas['helper']->getListButton('delete', $viewDatas) ?>
|
|
</td>
|
|
</tr>
|
|
<?php $cnt++ ?>
|
|
<?php endforeach ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="index_batchjob">
|
|
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
|
<ul class="nav justify-content-center">
|
|
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
|
|
<?php foreach ($viewDatas['batchjob_fields'] as $field): ?>
|
|
<?= $viewDatas['helper']->getFieldForm($field, DEFAULTS['EMPTY'], $viewDatas, ["id" => $field]) ?>
|
|
<?php endforeach ?>
|
|
<li class="nav-item"><?= $viewDatas['helper']->getListButton('batchjob', $viewDatas) ?></li>
|
|
<li class="nav-item"><?= $viewDatas['helper']->getListButton('create', $viewDatas) ?></li>
|
|
</ul>
|
|
<?= form_close() ?>
|
|
</div>
|
|
<div class=" index_pagination"><?= $viewDatas['pagination'] ?></div>
|
|
<div class="index_bottom">
|
|
<?php if (in_array($viewDatas['action_form'], [FORMS['MODAL'], FORMS['IFRAME']])): ?>
|
|
<?= $this->include('templates/' . $viewDatas['layout'] . '/' . $viewDatas['action_form']); ?>
|
|
<?php endif ?>
|
|
</div>
|
|
<script>
|
|
function submitBatchJob() {
|
|
var validate = false;
|
|
//batchjob용 선택사항 검증
|
|
<?php foreach ($viewDatas['batchjob_fields'] as $field): ?>
|
|
var element = document.getElementById('<?= $field ?>');
|
|
if (element.options[element.selectedIndex].value != "") {
|
|
validate = true;
|
|
}
|
|
<?php endforeach ?>
|
|
if (!validate) {
|
|
alert('변경항목은 하나 이상을 선택하셔야합니다.');
|
|
return false;
|
|
}
|
|
//적용받는 uids가 한개라도 선택되었다면 true
|
|
var checkboxes = document.querySelectorAll('input[name="batchjob_uids[]"]:checked');
|
|
if (checkboxes.length === 0) {
|
|
alert('적용할 리스트를 선택해주세요.');
|
|
validate = false;
|
|
}
|
|
return validate;
|
|
}
|
|
</script>
|
|
<script type="text/javascript" src="/js/common/resizeTable.js"></script>
|
|
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/index.js"></script>
|
|
<?= $this->endSection() ?>
|