113 lines
4.1 KiB
PHP
113 lines
4.1 KiB
PHP
<div class="content-wrapper">
|
||
<section class="content">
|
||
<div class="box">
|
||
<div class="box-header">
|
||
<CENTER><h3 class="box-title"> Configuration Details</h3></CENTER>
|
||
</div>
|
||
<div class="container-fluid">
|
||
<div class="row">
|
||
<div class="col-xs-12 text-right">
|
||
<div class="form-group">
|
||
<a class="btn btn-success" href="<?php echo base_url(); ?>addconfig">Add New Configuration</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-12">
|
||
<?php
|
||
helper('form');
|
||
$error = session()->getFlashdata('error');
|
||
if ($error) {
|
||
?>
|
||
<div class="alert alert-danger alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo session()->getFlashdata('error'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
<?php
|
||
$success = session()->getFlashdata('success');
|
||
if ($success) {
|
||
?>
|
||
<div class="alert alert-info alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo session()->getFlashdata('success'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
|
||
?> </div>
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-xs-12">
|
||
<table id="configtable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||
<thead style="background-color: #ddd;">
|
||
<tr>
|
||
<th>Configuration ID</th>
|
||
<th>Configuration Name</th>
|
||
<th>Description</th>
|
||
<th>Create Date</th>
|
||
<th>Action</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php
|
||
if (!empty($userRecords)) {
|
||
foreach ($userRecords as $record) {
|
||
?>
|
||
<tr>
|
||
|
||
<td><?php echo $record->Config_ID ?></td>
|
||
<td><?php echo $record->ConfigName ?></td>
|
||
<td><?php echo $record->Comments ?> </td>
|
||
<!-- <td><?php echo $record->CreatedDate ?></td> -->
|
||
|
||
<!-- <td align="right"><?php $dt = new DateTime($record->CreatedDate);
|
||
$CreatedDate = $dt->format('d-m-Y');
|
||
echo $CreatedDate ?> </td> -->
|
||
|
||
<?php if (date('d-m-Y', strtotime($record->CreatedDate)) == "30-11--0001") {
|
||
$cdate = '00-00-0000';
|
||
} else {
|
||
$cdate = date('d-m-Y', strtotime($record->CreatedDate));
|
||
} ?>
|
||
<td align="right"><?php echo $cdate; ?> </td>
|
||
|
||
<td><a href="<?php echo base_url() . 'configurationctrl/editconfig?ConfigID=' . $record->Config_ID; ?>"><i class="fa fa-pencil"></i> </a>
|
||
<!-- <a><i class="fa fa-trash"></i> </a> -->
|
||
</td>
|
||
|
||
</tr>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||
|
||
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||
<script type="text/javascript">
|
||
$(function() {
|
||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||
$('#configtable').DataTable({
|
||
"paging": true,
|
||
"lengthChange": true,
|
||
"searching": true,
|
||
"ordering": true,
|
||
"aaSorting": [
|
||
[3, "desc"]
|
||
],
|
||
"info": true,
|
||
"autoWidth": true
|
||
|
||
});
|
||
});
|
||
</script>
|