163 lines
7.0 KiB
PHP
163 lines
7.0 KiB
PHP
<?php
|
|
$pagination_baseurl = $this->getUrl($Mod,"Index");
|
|
$pagination_baseurl_params = ["filter" => $filter];
|
|
$pagination_entity_name = "Rufnummernblöcke";
|
|
?>
|
|
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
|
|
|
<!-- start page title -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="page-title-box">
|
|
<div class="page-title-right">
|
|
<ol class="breadcrumb m-0">
|
|
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>"><?=MFAPPNAME_SLUG?></a></li>
|
|
<li class="breadcrumb-item active">Rufnummernblöcke</li>
|
|
</ol>
|
|
</div>
|
|
<h4 class="page-title">Rufnummernblöcke</h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|
|
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
|
|
<div class="card">
|
|
<div class="card-body mb-3">
|
|
<h4 class="header-title mb-3">Filter</h4>
|
|
|
|
<form method="get" action="<?=self::getUrl("Voicenumberblock")?>">
|
|
<div class="row">
|
|
<div class="col-1">
|
|
<label class="form-label" for="filter_name">Name</label>
|
|
<input type="text" class="form-control" name="filter[name]" id="filter_name" value="<?=$filter['name']?>" />
|
|
</div>
|
|
|
|
<div class="col-1">
|
|
<label class="form-label" for="filter_countrycode">Landeskennzahl</label>
|
|
<input type="text" class="form-control" name="filter[countrycode]" id="filter_countrycode" value="<?=$filter['countrycode']?>" />
|
|
</div>
|
|
|
|
<div class="col-1">
|
|
<label class="form-label" for="filter_areacode">Ortskennzahl</label>
|
|
<input type="text" class="form-control" name="filter[areacode]" id="filter_areacode" value="<?=$filter['areacode']?>" />
|
|
</div>
|
|
|
|
<div class="col-1">
|
|
<label class="form-label" for="filter_first">Anfang</label>
|
|
<input type="text" class="form-control" name="filter[first]" id="filter_first" value="<?=$filter['first']?>" />
|
|
</div>
|
|
|
|
<div class="col-1">
|
|
<label class="form-label" for="filter_last">Ende</label>
|
|
<input type="text" class="form-control" name="filter[last]" id="filter_last" value="<?=$filter['last']?>" />
|
|
</div>
|
|
|
|
<div class="col-1">
|
|
<label class="form-label" for="filter_number">Nummer</label>
|
|
<input type="text" class="form-control" name="filter[number]" id="filter_number" value="<?=$filter['number']?>" />
|
|
</div>
|
|
|
|
<div class="col-2">
|
|
<label class="form-label" for="filter_comment">Kommentar</label>
|
|
<input type="text" class="form-control" name="filter[comment]" id="filter_comment" value="<?=$filter['comment']?>" />
|
|
</div>
|
|
|
|
</div>
|
|
<div class="row mt-2">
|
|
<div class="col">
|
|
<button type="submit" class="btn btn-primary">Filter anwenden</button>
|
|
<a class="btn btn-secondary" href="<?=self::getUrl("Voicenumberblock")?>">Filter zurücksetzen</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="card">
|
|
<div class="card-body mb-3">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="float-left">
|
|
<h4 class="header-title">Rufnummernblöcke</h4>
|
|
</div>
|
|
<div class="float-right">
|
|
<a class="btn btn-primary mb-2" href="<?=self::getUrl("Voicenumberblock", "add")?>"><i class="fas fa-plus"></i> Neuen Rufnummernblock anlegen</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
|
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
|
|
|
<table class="table table-striped table-hover">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Landeskennzahl</th>
|
|
<th>Ortskennzahl</th>
|
|
<th>Nummernbasis</th>
|
|
<th>Anfang</th>
|
|
<th>Ende</th>
|
|
<th>Kommentar</th>
|
|
<th></th>
|
|
</tr>
|
|
<?php foreach($blocks as $block): ?>
|
|
<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->short_prefix?></td>
|
|
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->first?></td>
|
|
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->last?></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>
|
|
|
|
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
|
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</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");
|
|
}
|
|
}
|
|
|
|
|
|
var block;
|
|
var hash = window.location.hash.substr(1);
|
|
var match = hash.match(/block=(\d+)/);
|
|
if(match && match[1]) {
|
|
block = match[1]
|
|
toggleBlock(block);
|
|
}
|
|
|
|
</script>
|
|
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|