cfmgrv3/app/Views/admin/user/index_modal.php
2023-06-19 13:06:49 +09:00

66 lines
2.6 KiB
PHP

<?= $this->extend('layouts/admin') ?>
<?= $this->section('content') ?>
<?= $this->include('templates/admin/header'); ?>
<?= $this->include('templates/admin/index/header'); ?>
<table class="table table-bordered table-hover table-striped indexTable ">
<tr>
<td>번호</td>
<?php foreach ($fields as $field) : ?>
<td><?= getIndexSort_Helper($field,getFieldLabel_Helper($field),["target" => "_self"]) ?></td>
<?php endforeach; ?>
<td>작업</td>
</tr>
<?php $i = 0; ?>
<?php foreach ($rows as $row) : ?>
<tr <?= $row['status'] != 'use' ? 'style="color:red;"' : '' ?>>
<td><?= anchor(current_url().'/update/'.$row['uid'],$total_count - (($page - 1) * $per_page + $i),["target" => "_self"]) ?></td>
<?php foreach ($fields as $field) : ?><td><?= getFieldView_Helper($field,$row) ?></td><?php endforeach; ?>
<td><?= anchor(current_url().'/view/'.$row['uid'],ICONS['DELETE'],["class"=>"btn btn-sm btn-danger btn-circle","target" => "_self"]) ?></td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</table>
<div class="pagenation"><?= $pagenation ?></div>
<div class="indexAction"><?= anchor(current_url().'/insert','입력',["class"=>"btn btn-sm btn-primary btn-circle","target" => "_self"]) ?></div>
<?= $this->include('templates/admin/footer'); ?>
<!-- Modal -->
<div class="modal fade" id="UserModal" tabindex="-1" role="dialog" aria-labelledby="UserModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body"><iframe width="100%" height="100%" frameborder="0" allowfullscreen></iframe></div>
<div class="modal-footer"><button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button></div>
</div>
</div>
</div>
<style>
.modal-dialog, .modal-body {
width: 560px;
height:400px !important;
}
.modal-header {
background-color: #557AB7;
padding:5px 5px;
color:#FFF;
border-bottom:2px dashed #557AB7;
}
</style>
<script>
$(document).ready(function() {
$("#modalButtion").click(function(e) {
//e.preventDefault();
//$("#UserModal modal-title").innerHTML="입력";
var url = $(this).attr("data-href");
var iframe = $("#UserModal iframe");
iframe.attr("src",url);
// alert(iframe.parent.attr.height());
// iframe.parent.attr.height = iframe.contents().height();
});
});
</script>
<?= $this->endSection() ?>