Files
thetool/Layout/default/Voicenumberblock/include/block-detail.php
2026-01-15 18:09:39 +01:00

55 lines
2.6 KiB
PHP

<?php
/** @var Voicenumberblock $block */
?>
<div class="card">
<div class="card-body">
<h4 class="header-title">Rufnummern <?=$block->countrycode?> <?=$block->areacode?> <?=$block->short_first?> - <?=$block->countrycode?> <?=$block->areacode?> <?=$block->short_last?></h4>
<table class="table table-striped table-sm">
<tr>
<th>Nummer</th>
<th>Aktiv</th>
<th>Contract ID</th>
<th>Routing</th>
<th>Portierungsstatus</th>
<th>Sperre</th>
<th>Entsperrung</th>
<th></th>
</tr>
<?php $i = 0; foreach(range((array_key_exists($block->id, $num_from) ? $num_from[$block->id] : $block->first), $block->last) as $number): ?>
<?php $num = VoicenumberModel::getFirst(['voicenumberblock_id' => $block->id, 'number' => $number]) ?>
<tr class="<?=($num->disabled) ? "bg-secondary text-white" : ""?>">
<td><?=$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 elseif($num->disabled): ?>
<span class="text-success text-danger" title="Nummer wurde wegportiert"><i class="far fa-anchor bg-white" style="padding: 2px;"></i> <i class="far fa-file-export bg-white" style="padding: 2px;"></i></span>
<?php else: ?>
<span class="text-danger"><i class="fas fa-times"></i></span>
<?php endif; ?>
</td>
<td><a href="<?=self::getUrl("Contract", "view", ["id" => $num->contract_id])?>"><?=$num->contract_id?></a></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?><?=($num->disabled > 1) ? " (<i>".date("d.m.Y H:i", $num->disabled)."</i>)" : ""?></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>