Ajout de la suppression sur les logs du système (sms reçus, envoyés, events, sms stop)

This commit is contained in:
Pierre-Lin Bonnemaison 2015-10-13 19:24:20 +02:00
parent 7eed5456e7
commit 17a3d6c938
13 changed files with 381 additions and 50 deletions

View file

@ -43,19 +43,21 @@
<th>Message</th>
<th>Date</th>
<th>Statut</th>
<th>Sélectionner</th>
</tr>
</thead>
<tbody>
<?php
foreach ($sendeds as $send)
foreach ($sendeds as $sended)
{
?>
<tr>
<td><?php secho($send['id']); ?></td>
<td><?php secho($send['target']); ?></td>
<td><?php secho($send['content']); ?></td>
<td><?php secho($send['at']); ?></td>
<td><?php secho($send['delivered'] ? 'Délivré' : ($send['failed'] ? 'Échoué' : 'Inconnu')); ?></td>
<td><?php secho($sended['id']); ?></td>
<td><?php secho($sended['target']); ?></td>
<td><?php secho($sended['content']); ?></td>
<td><?php secho($sended['at']); ?></td>
<td><?php secho($sended['delivered'] ? 'Délivré' : ($sended['failed'] ? 'Échoué' : 'Inconnu')); ?></td>
<td><input type="checkbox" value="<?php secho($sended['id']); ?>"></td>
</tr>
<?php
}
@ -64,6 +66,15 @@
</table>
</div>
<nav>
<div class="text-right col-xs-12 no-padding">
<strong>Action groupée :</strong>
<div class="btn-group action-dropdown" target="#table-sendeds">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action pour la sélection <span class="caret"></span></button>
<ul class="dropdown-menu pull-right" role="menu">
<li><a href="<?php echo $this->generateUrl('sendeds', 'delete', [$_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</a></li>
</ul>
</div>
</div>
<ul class="pager">
<?php
if ($page)
@ -85,7 +96,6 @@
?>
</ul>
</nav>
</div>
</div>
</div>
</div>
@ -93,5 +103,21 @@
</div>
</div>
</div>
<script>
jQuery(document).ready(function ()
{
jQuery('.action-dropdown a').on('click', function (e)
{
e.preventDefault();
var target = jQuery(this).parents('.action-dropdown').attr('target');
var url = jQuery(this).attr('href');
jQuery(target).find('input:checked').each(function ()
{
url += '/' + jQuery(this).val();
});
window.location = url;
});
});
</script>
<?php
$incs->footer();