2019-10-29 14:57:13 +01:00
|
|
|
<?php
|
|
|
|
//Template dashboard
|
|
|
|
|
|
|
|
$this->render('incs/head', ['title' => 'Events - Show All'])
|
|
|
|
?>
|
|
|
|
<div id="wrapper">
|
|
|
|
<?php
|
|
|
|
$this->render('incs/nav', ['page' => 'events'])
|
|
|
|
?>
|
|
|
|
<div id="page-wrapper">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<!-- Page Heading -->
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<h1 class="page-header">
|
|
|
|
Dashboard <small>Évènements</small>
|
|
|
|
</h1>
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li>
|
2019-11-07 17:52:33 +01:00
|
|
|
<i class="fa fa-dashboard"></i> <a href="<?php echo \descartes\Router::url('Dashboard', 'show'); ?>">Dashboard</a>
|
2019-10-29 14:57:13 +01:00
|
|
|
</li>
|
|
|
|
<li class="active">
|
|
|
|
<i class="fa fa-clock-o"></i> Évènements
|
|
|
|
</li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- /.row -->
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title"><i class="fa fa-clock-o fa-fw"></i> Liste des évènements</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<form method="GET">
|
2020-09-23 03:02:13 +02:00
|
|
|
<div class="table-events">
|
|
|
|
<table class="table table-bordered table-hover table-striped datatable" id="table-events">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Type</th>
|
|
|
|
<th>Date</th>
|
|
|
|
<th>Texte</th>
|
|
|
|
<?php if ($_SESSION['user']['admin']) { ?>
|
2021-06-29 20:05:56 +02:00
|
|
|
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
2020-09-23 03:02:13 +02:00
|
|
|
<?php } ?>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody></tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<?php if ($_SESSION['user']['admin']) { ?>
|
|
|
|
<div class="text-right col-xs-12 no-padding">
|
|
|
|
<strong>Action pour la séléction :</strong>
|
|
|
|
<button class="btn btn-default btn-confirm" type="submit" formaction="<?php echo \descartes\Router::url('Event', 'delete', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</button>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
2019-10-29 14:57:13 +01:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
2020-09-23 03:02:13 +02:00
|
|
|
jQuery(document).ready(function ()
|
|
|
|
{
|
|
|
|
jQuery('.datatable').DataTable({
|
|
|
|
"pageLength": 25,
|
2021-04-23 22:56:27 +02:00
|
|
|
"lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]],
|
2020-09-23 03:02:13 +02:00
|
|
|
"language": {
|
|
|
|
"url": HTTP_PWD + "/assets/js/datatables/french.json",
|
|
|
|
},
|
2021-07-21 16:42:25 +02:00
|
|
|
"orderMulti": false,
|
|
|
|
"order": [[1, "desc"]],
|
2020-09-23 03:02:13 +02:00
|
|
|
"columnDefs": [{
|
|
|
|
'targets': 'checkcolumn',
|
|
|
|
'orderable': false,
|
|
|
|
}],
|
2021-07-21 16:42:25 +02:00
|
|
|
"serverSide": true,
|
2020-09-23 03:02:13 +02:00
|
|
|
"ajax": {
|
|
|
|
'url': '<?php echo \descartes\Router::url('Event', 'list_json'); ?>',
|
|
|
|
'dataSrc': 'data',
|
|
|
|
},
|
|
|
|
"columns" : [
|
|
|
|
{
|
|
|
|
data: 'type',
|
|
|
|
render: function (data, type, row, meta) {
|
|
|
|
return '<span class="fa fa-fw ' + row.icon + '"></span>';
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{data: 'at', render: jQuery.fn.dataTable.render.text()},
|
|
|
|
{data: 'text', render: jQuery.fn.dataTable.render.text()},
|
|
|
|
|
|
|
|
<?php if ($_SESSION['user']['admin']) { ?>
|
|
|
|
{
|
|
|
|
data: 'id',
|
|
|
|
render: function (data, type, row, meta) {
|
|
|
|
return '<input name="ids[]" type="checkbox" value="' + data + '">';
|
|
|
|
},
|
|
|
|
},
|
|
|
|
<?php } ?>
|
|
|
|
],
|
|
|
|
"deferRender": true
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
2019-10-29 14:57:13 +01:00
|
|
|
</script>
|
|
|
|
<?php
|
|
|
|
$this->render('incs/footer');
|