mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
fix empty phone list
This commit is contained in:
parent
9bf1433d2e
commit
64b8b3bdc7
1 changed files with 32 additions and 26 deletions
|
@ -35,36 +35,42 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<form method="GET">
|
<form method="GET">
|
||||||
<div class="table-responsive">
|
<?php if (!$phones) { ?>
|
||||||
<table class="table table-bordered table-hover table-striped" id="table-phones">
|
<p>Aucun téléphone utilisable n'a été ajouté pour le moment.</p>
|
||||||
<thead>
|
<?php } else { ?>
|
||||||
<tr>
|
<div class="table-responsive">
|
||||||
<th>#</th>
|
<table class="table table-bordered table-hover table-striped" id="table-phones">
|
||||||
<th>Numéro</th>
|
<thead>
|
||||||
<th>Adaptateur</th>
|
<tr>
|
||||||
<th style="width:5%;">Sélectionner</th>
|
<th>#</th>
|
||||||
</tr>
|
<th>Numéro</th>
|
||||||
</thead>
|
<th>Adaptateur</th>
|
||||||
<tbody>
|
<th style="width:5%;">Sélectionner</th>
|
||||||
<?php foreach ($phones as $phone) { ?>
|
</tr>
|
||||||
<tr>
|
</thead>
|
||||||
<td><?php $this->s($phone['id']); ?></td>
|
<tbody>
|
||||||
<td><?php $this->s(\controllers\internals\Tool::phone_format($phone['number'])); ?></td>
|
<?php foreach ($phones as $phone) { ?>
|
||||||
<td><?php $this->s($phone['adapter']); ?></td>
|
<tr>
|
||||||
<td><input type="checkbox" value="<?php $this->s($phone['id']); ?>" name="ids[]"></td>
|
<td><?php $this->s($phone['id']); ?></td>
|
||||||
</tr>
|
<td><?php $this->s(\controllers\internals\Tool::phone_format($phone['number'])); ?></td>
|
||||||
<?php } ?>
|
<td><?php $this->s($phone['adapter']); ?></td>
|
||||||
</tbody>
|
<td><input type="checkbox" value="<?php $this->s($phone['id']); ?>" name="ids[]"></td>
|
||||||
</table>
|
</tr>
|
||||||
</div>
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
<div>
|
<div>
|
||||||
<div class="col-xs-6 no-padding">
|
<div class="col-xs-6 no-padding">
|
||||||
<a class="btn btn-success" href="<?php echo \descartes\Router::url('Phone', 'add'); ?>"><span class="fa fa-plus"></span> Ajouter un téléphone</a>
|
<a class="btn btn-success" href="<?php echo \descartes\Router::url('Phone', 'add'); ?>"><span class="fa fa-plus"></span> Ajouter un téléphone</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right col-xs-6 no-padding">
|
<?php if ($phones) { ?>
|
||||||
<strong>Action pour la séléction :</strong>
|
<div class="text-right col-xs-6 no-padding">
|
||||||
<button class="btn btn-default btn-confirm" type="submit" formaction="<?php echo \descartes\Router::url('Phone', 'delete', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</button>
|
<strong>Action pour la séléction :</strong>
|
||||||
</div>
|
<button class="btn btn-default btn-confirm" type="submit" formaction="<?php echo \descartes\Router::url('Phone', 'delete', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</button>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue