mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-22 09:26:27 +02:00
add datatables everywhere
This commit is contained in:
parent
a426c699f9
commit
6f1c726284
33 changed files with 373 additions and 144 deletions
|
@ -39,13 +39,13 @@
|
|||
<p>Aucune commande n'a été créée pour le moment.</p>
|
||||
<?php } else { ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-commands">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-commands">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Script</th>
|
||||
<th>Admin obligatoire</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -53,6 +53,9 @@
|
|||
Les conditions vous permettent de définir dynamiquement les contacts qui appartiennent au groupe en utilisant leurs données additionnelles. Pour plus d'informations consultez la documentation relative à <a href="#">l'utilisation des groupes conditionnels.</a>
|
||||
</p>
|
||||
<input class="form-control" name="groups[<?php $this->s($group['id']); ?>][condition]" value="<?php $this->s($group['condition']); ?>"/>
|
||||
<div class="scheduled-preview-container">
|
||||
<a class="btn btn-info preview-button" href="#">Prévisualiser les contacts</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<?php } ?>
|
||||
|
@ -66,18 +69,46 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" tabindex="-1" id="preview-text-modal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Prévisualisation des contacts</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<pre></pre>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
jQuery('.add-contacts').each(function()
|
||||
{
|
||||
jQuery(this).magicSuggest({
|
||||
data: '<?php echo \descartes\Router::url('Contact', 'json_list'); ?>',
|
||||
valueField: 'id',
|
||||
displayField: 'name',
|
||||
});
|
||||
});
|
||||
});
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
jQuery('body').on('click', '.preview-button', function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var condition = jQuery(this).parents('.form-group').find('input').val();
|
||||
|
||||
var datas = {
|
||||
'condition' : condition,
|
||||
};
|
||||
|
||||
jQuery.ajax({
|
||||
type: "POST",
|
||||
url: HTTP_PWD + '/conditional_group/preview/',
|
||||
data: datas,
|
||||
success: function (datas) {
|
||||
jQuery('#preview-text-modal').find('.modal-body pre').text(datas.result);
|
||||
jQuery('#preview-text-modal').modal({'keyboard': true});
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$this->render('incs/footer');
|
||||
|
|
|
@ -39,12 +39,12 @@
|
|||
<p>Aucun groupe n'a été formé pour le moment.</p>
|
||||
<?php } else { ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-groupes">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-groupes">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Condition</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -41,12 +41,12 @@
|
|||
<p>Aucun contact n'est enregistré pour le moment.</p>
|
||||
<?php } else { ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-contacts">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-contacts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Numéro</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
Aucune discussion n'est en cours actuellement.
|
||||
<?php } else { ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-discussions">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-discussions">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date du dernier message</th>
|
||||
|
|
|
@ -39,13 +39,13 @@
|
|||
<p>Aucun évènement n'a été enregistré pour le moment.</p>
|
||||
<?php } else { ?>
|
||||
<div class="table-events">
|
||||
<table class="table table-bordered table-hover table-striped" id="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']) { ?><th>Sélectionner</th><?php } ?>
|
||||
<th class="checkcolumn">✓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -69,17 +69,6 @@
|
|||
<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 } ?>
|
||||
<ul class="pager">
|
||||
<?php if ($page) { ?>
|
||||
<li><a href="<?php echo \descartes\Router::url('Event', 'list', array('page' => $page - 1)); ?>"><span aria-hidden="true">←</span> Précèdents</a></li>
|
||||
<?php } ?>
|
||||
|
||||
Page : <?php $this->s($page + 1); ?>
|
||||
|
||||
<?php if ($limit == $nb_results) { ?>
|
||||
<li><a href="<?php echo \descartes\Router::url('Event', 'list', array('page' => $page + 1)); ?>">Suivants <span aria-hidden="true">→</span></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</form>
|
||||
|
|
|
@ -39,12 +39,12 @@
|
|||
<p>Aucun groupe n'a été formé pour le moment.</p>
|
||||
<?php } else { ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-groupes">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-groupes">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Nombre de contacts</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -37,6 +37,9 @@
|
|||
<!-- International Phone Number, JS and CSS -->
|
||||
<script src="<?php echo HTTP_PWD_JS; ?>/intlTelInput/intlTelInput.min.js"></script>
|
||||
<link href="<?php echo HTTP_PWD_CSS; ?>/intlTelInput.min.css" rel="stylesheet">
|
||||
<!-- DataTables -->
|
||||
<link href="<?php echo HTTP_PWD_CSS; ?>/datatables/datatables.min.css" rel="stylesheet" type="text/css">
|
||||
<script src="<?php echo HTTP_PWD_JS; ?>/datatables/datatables.min.js"></script>
|
||||
|
||||
<!-- Custom JS -->
|
||||
<script src="<?php echo HTTP_PWD_JS; ?>/custom.js"></script>
|
||||
|
|
|
@ -39,13 +39,13 @@
|
|||
<p>Aucun téléphone utilisable n'a été ajouté pour le moment.</p>
|
||||
<?php } else { ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-phones">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-phones">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Adaptateur</th>
|
||||
<th>Callbacks</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<p>Aucun SMS n'a été reçu pour le moment.</p>
|
||||
<?php } else { ?>
|
||||
<div class="table-receiveds">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-receiveds">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-receiveds">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>De</th>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
<th>Commande</th>
|
||||
<?php if ($_SESSION['user']['admin']) { ?><th>Sélectionner</th><?php } ?>
|
||||
<?php if ($_SESSION['user']['admin']) { ?><th class="checkcolumn">✓</th><?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -79,16 +79,6 @@
|
|||
<button class="btn btn-default btn-confirm" type="submit" formaction="<?php echo \descartes\Router::url('Received', 'delete', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<ul class="pager">
|
||||
<?php if ($page) { ?>
|
||||
<li><a href="<?php echo \descartes\Router::url('Received', 'list', array('page' => $page - 1)); ?>"><span aria-hidden="true">←</span> Précèdents</a></li>
|
||||
<?php } ?>
|
||||
<?php $this->s('Page : ' . ($page + 1)); ?>
|
||||
|
||||
<?php if ($limit == $nb_results) { ?>
|
||||
<li><a href="<?php echo \descartes\Router::url('Received', 'list', array('page' => $page + 1)); ?>">Suivants <span aria-hidden="true">→</span></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</form>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<p>Aucun SMS non lu à afficher.</p>
|
||||
<?php } else { ?>
|
||||
<div class="table-receiveds">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-receiveds">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-receiveds">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>De</th>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
<th>Commande</th>
|
||||
<?php if ($_SESSION['user']['admin']) { ?><th>Sélectionner</th><?php } ?>
|
||||
<?php if ($_SESSION['user']['admin']) { ?><th class="checkcolumn">✓</th><?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Contenu</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<p>Aucun SMS n'a été envoyé pour le moment.</p>
|
||||
<?php } else { ?>
|
||||
<div class="table-sendeds">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-sendeds">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-sendeds">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>De</th>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<th>Date</th>
|
||||
<th>Statut</th>
|
||||
<?php if ($_SESSION['user']['admin']) { ?>
|
||||
<th>Sélectionner</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -89,17 +89,6 @@
|
|||
<button class="btn btn-default btn-confirm" type="submit" formaction="<?php echo \descartes\Router::url('Sended', 'delete', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<ul class="pager">
|
||||
<?php if ($page) { ?>
|
||||
<li><a href="<?php echo \descartes\Router::url('Sended', 'list', array('page' => $page - 1)); ?>"><span aria-hidden="true">←</span> Précèdents</a></li>
|
||||
<?php } ?>
|
||||
|
||||
Page : <?php $this->s($page + 1); ?>
|
||||
|
||||
<?php if ($limit == $nb_results) { ?>
|
||||
<li><a href="<?php echo \descartes\Router::url('Sended', 'list', array('page' => $page + 1)); ?>">Suivants <span aria-hidden="true">→</span></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
@ -123,7 +112,8 @@
|
|||
url += '/' + jQuery(this).val();
|
||||
});
|
||||
window.location = url;
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
|
|
@ -39,11 +39,11 @@
|
|||
<p>Aucun SMS STOP n'a été reçu pour le moment.</p>
|
||||
<?php } else { ?>
|
||||
<div class="table-events">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-smsstop">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-smsstop">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Numéro</th>
|
||||
<?php if ($_SESSION['user']['admin']) { ?><th>Sélectionner</th><?php } ?>
|
||||
<th class="checkcolumn">✓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -65,16 +65,6 @@
|
|||
<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>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<ul class="pager">
|
||||
<?php if ($page) { ?>
|
||||
<li><a href="<?php echo \descartes\Router::url('SmsStop', 'list', array('page' => $page - 1)); ?>"><span aria-hidden="true">←</span> Précèdents</a></li>
|
||||
<?php } ?>
|
||||
<?php $this->s('Page : ' . ($page + 1)); ?>
|
||||
|
||||
<?php if ($limit == $nb_results) { ?>
|
||||
<li><a href="<?php echo \descartes\Router::url('SmsStop', 'list', array('page' => $page + 1)); ?>">Suivants <span aria-hidden="true">→</span></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</form>
|
||||
|
|
|
@ -36,13 +36,13 @@
|
|||
<div class="panel-body">
|
||||
<form method="GET">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-users">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-users">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Email</th>
|
||||
<th>Admin</th>
|
||||
<th>Status</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -37,12 +37,12 @@
|
|||
<p>Aucun webhook n'a été créé pour le moment.</p>
|
||||
<?php } else { ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="table-webhooks">
|
||||
<table class="table table-bordered table-hover table-striped datatable" id="table-webhooks">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Url</th>
|
||||
<th>Type de webhook</th>
|
||||
<th style="width:5%;">Sélectionner</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue