Added voicenumber list to Voicenumberblock
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="first">Erste Nummer *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="first" id="first" value="<?=$block->getFirst()?>" />
|
||||
<input type="text" class="form-control" name="first" id="first" value="<?=($block->id) ? $block->getFirst() : ""?>" />
|
||||
<small>4080010</small>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,7 +63,7 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="last">Letzte Nummer *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="last" id="last" value="<?=$block->getLast()?>" />
|
||||
<input type="text" class="form-control" name="last" id="last" value="<?=($block->id) ? $block->getLast() : ""?>" />
|
||||
<small>4080099</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -123,19 +123,25 @@
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($blocks as $block): ?>
|
||||
<tr>
|
||||
<td><?=$block->name?></td>
|
||||
<td><?=$block->countrycode?></td>
|
||||
<td><?=$block->areacode?></td>
|
||||
<td><?=$block->base?></td>
|
||||
<td><?=$block->getFirst()?></td>
|
||||
<td><?=$block->getLast()?></td>
|
||||
<td><?=$block->comment?></td>
|
||||
<tr class="building-list-tr" id="block-<?=$block->id?>">
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->name?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->countrycode?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->areacode?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->base?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->getFirst()?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->getLast()?></td>
|
||||
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->comment?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Voicenumberblock", "edit", ["id" => $block->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Voicenumberblock", "delete", ["id" => $block->id])?>" onclick="if(!confirm('Rufnummernblock wirklich löschen?')) return false;" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="block-detail-<?=$block->id?>" style="display:none; background-color:#fff">
|
||||
<td colspan="8">
|
||||
<?php include(realpath(dirname(__FILE__)."/include")."/block-detail.php"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none;"></tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
@@ -175,4 +181,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function toggleBlock(id) {
|
||||
$('#block-detail-' + id).toggle();
|
||||
if($('#block-detail-' + id).is(":hidden")) {
|
||||
$('#block-' + id).removeClass("table-info");
|
||||
$('#block-' + id).removeClass("text-info");
|
||||
} else {
|
||||
$('#block-' + id).addClass("text-info");
|
||||
$('#block-' + id).addClass("table-info");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
44
Layout/default/Voicenumberblock/include/block-detail.php
Normal file
44
Layout/default/Voicenumberblock/include/block-detail.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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>
|
||||
</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 H:i:s", $num->port_out_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>
|
||||
</tr>
|
||||
<?php $i++; if($i >= 100) break; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user