Files
thetool/Layout/default/Voicenumberblock/include/block-detail.php
2022-02-15 20:41:59 +01:00

51 lines
2.1 KiB
PHP

<?php
/** @var Voicenumberblock $block */
?>
<div class="card">
<div class="card-body">
<h4 class="header-title">Rufnummern <?=$block->countrycode?><?=$block->areacode?><?=$block->getFirst()?> - <?=$block->countrycode?><?=$block->areacode?><?=$block->getLast()?></h4>
<table class="table table-striped table-sm">
<tr>
<th>Nummer</th>
<th>Aktiv</th>
<th>Routing</th>
<th>Portierungsstatus</th>
<th>Sperre</th>
<th>Entsperrung</th>
<th></th>
</tr>
<?php $i = 0; foreach(range($block->getFirst(), $block->getLast()) as $number): ?>
<?php $num = null; $num = VoicenumberModel::getFirst(['voicenumberblock_id' => $block_id, 'number' => ($block->number_prepend_zero) ? "0$number" : $number]) ?>
<tr>
<td><?=$block->countrycode?> <?=$block->areacode?> <?=($block->number_prepend_zero) ? "0" : ""?><?=$number?></td>
<td>
<?php if($num->active): ?>
<span class="text-success"><i class="fas fa-check"></i></span>
<small class="text-monospace">(seit <?=($num->id) ? date("d.m.Y H:i:s", $num->activated_date) : ""?>)</small>
<?php else: ?>
<span class="text-danger"><i class="fas fa-times"></i></span>
<?php endif; ?>
</td>
<td><?=__($num->routing)?></td>
<td>
<?php if($num->ported_out): ?>
Exportiert
<small class="text-monospace">(<?=($num->id) ? date("d.m.Y", $num->port_out_date) : ""?>)</small>
<?php elseif($num->ported_in): ?>
Importiert
<small class="text-monospace">(<?=($num->id) ? date("d.m.Y", $num->port_in_date) : ""?>)</small>
<?php else: ?>
Lokal
<?php endif; ?>
</td>
<td><?=$num->disabled_reason?></td>
<td><?=($num->id && $num->enable_on_date) ? date("d.m.Y", $num->enable_on_date) : ""?></td>
<td>
<a href="<?=self::getUrl("Voicenumber", "edit", ["block_id" => $block->id, "number" => $number])?>"><i class="fas fa-edit"></i></a>
</td>
</tr>
<?php $i++; if($i >= 100) break; ?>
<?php endforeach; ?>
</table>
</div>
</div>