Fix smsstop list on non-admin
This commit is contained in:
parent
8f3634b921
commit
231efc736b
|
@ -40,7 +40,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Numéro</th>
|
<th>Numéro</th>
|
||||||
<?php if ($_SESSION['user']['admin']) { ?>
|
<?php if ($_SESSION['user']['admin'] ?? false) { ?>
|
||||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<?php if ($_SESSION['user']['admin']) { ?>
|
<?php if ($_SESSION['user']['admin'] ?? false) { ?>
|
||||||
<div class="text-right col-xs-12 no-padding">
|
<div class="text-right col-xs-12 no-padding">
|
||||||
<strong>Action pour la séléction :</strong>
|
<strong>Action pour la séléction :</strong>
|
||||||
<button class="btn btn-default btn-confirm" type="submit" formaction="<?php echo \descartes\Router::url('SmsStop', 'delete', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</button>
|
<button class="btn btn-default btn-confirm" type="submit" formaction="<?php echo \descartes\Router::url('SmsStop', 'delete', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</button>
|
||||||
|
@ -74,11 +74,11 @@ jQuery(document).ready(function ()
|
||||||
"language": {
|
"language": {
|
||||||
"url": HTTP_PWD + "/assets/js/datatables/french.json",
|
"url": HTTP_PWD + "/assets/js/datatables/french.json",
|
||||||
},
|
},
|
||||||
|
"orderMulti": false,
|
||||||
"columnDefs": [{
|
"columnDefs": [{
|
||||||
'targets': 'checkcolumn',
|
'targets': 'checkcolumn',
|
||||||
'orderable': false,
|
'orderable': false,
|
||||||
}],
|
}],
|
||||||
|
|
||||||
"ajax": {
|
"ajax": {
|
||||||
'url': '<?php echo \descartes\Router::url('SmsStop', 'list_json'); ?>',
|
'url': '<?php echo \descartes\Router::url('SmsStop', 'list_json'); ?>',
|
||||||
'dataSrc': 'data',
|
'dataSrc': 'data',
|
||||||
|
@ -86,13 +86,16 @@ jQuery(document).ready(function ()
|
||||||
"columns" : [
|
"columns" : [
|
||||||
{
|
{
|
||||||
data: 'number_formatted',
|
data: 'number_formatted',
|
||||||
|
render: jQuery.fn.dataTable.render.text()
|
||||||
},
|
},
|
||||||
|
<?php if ($_SESSION['user']['admin'] ?? false) { ?>
|
||||||
{
|
{
|
||||||
data: 'id',
|
data: 'id',
|
||||||
render: function (data, type, row, meta) {
|
render: function (data, type, row, meta) {
|
||||||
return '<input name="ids[]" type="checkbox" value="' + data + '">';
|
return '<input name="ids[]" type="checkbox" value="' + data + '">';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
<?php } ?>
|
||||||
],
|
],
|
||||||
"deferRender": true
|
"deferRender": true
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue