Added AddressDB layouts
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
$urlfilter = [];
|
||||
if($s) {
|
||||
$urlfilter['s'] = $s;
|
||||
}
|
||||
if(is_array($filter) && count($filter)) {
|
||||
$urlfilter["filter"] = $filter;
|
||||
}
|
||||
$posturl = self::getUrl("AddressDB", "save", $urlfilter);
|
||||
?>
|
||||
<?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"><a href="<?=self::getUrl("AddressDB")?>">AddressDB</a></li>
|
||||
<li class="breadcrumb-item active"><?=($address->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Adresse</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title mb-2"><?=($address->id) ? "Adresse bearbeiten" : "Neue Adresse"?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=$posturl?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<input type="hidden" name="id" value="<?=$addresse->id?>" />
|
||||
<input type="hidden" name="f" value="<?=$f?>" />
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="netzgebiet_id">Netzgebiet</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control" name="netzgebiet_id" id="netzgebiet_id">
|
||||
<?php foreach($netzgebiete as $netzgebiet): ?>
|
||||
<option value="<?=$netzgebiet->id?>"><?=$netzgebiet->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="matchcode">Matchcode</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="matchcode" id="matchcode" value="<?=$address->matchcode?>">
|
||||
<small class="font-italic">Eindeutige Identifizierung das Produkts. Z.B. Anschlussadresse, Domainname usw.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="billing_period">Verrechnungsperiode</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control" name="billing_period" id="billing_period" placeholder="Verrechnungsperiode">
|
||||
<option value="1" <?=($product->billing_period == 1) ? "selected='selected'" : ""?>>Monatlich</option>
|
||||
<option value="12" <?=($product->billing_period == 12) ? "selected='selected'" : ""?>>Jährlich</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="note">Interne Notiz</label>
|
||||
<div class="col-lg-10">
|
||||
<textarea id="note" class="form-control" name="note" rows="5"><?=$building->note?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2"></label>
|
||||
<div class="col-lg-10">
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -0,0 +1,220 @@
|
||||
<?php
|
||||
$pagination_baseurl = $this->getUrl($Mod,"Index");
|
||||
$pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Adressen";
|
||||
?>
|
||||
<?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">GWR / AddressDB</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">GWR / AddressDB</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("AddressDB")?>">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_network_id">Netzgebiet</label>
|
||||
<select name="filter[network_id]" id="filter_network_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($my_adb_networks as $fnet): ?>
|
||||
<option value="<?=$fnet->id?>" <?=($filter['network_id'] == $fnet->id) ? "selected='selected'" : ""?>><?=$fnet->name?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php if($me->isAdmin()):?><option value="null" <?=($filter['network_id'] === "null") ? 'selected="selected"' : ""?>>-- Kein Netzgebiet --</option><?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_zip">PLZ</label>
|
||||
<input type="text" class="form-control" name="filter[zip]" id="filter_zip" value="<?=$filter['zip']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<div class="<?=(array_key_exists("network_id", $filter) && $filter['network_id'] === "null") ? "hidden" : ""?>" id="filter-gemeinde-id">
|
||||
<label class="form-label" for="filter_gemeinde_id">Gemeinde</label>
|
||||
<select name="filter[gemeinde_id]" id="filter_gemeinde_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($gemeinden as $gemeinde): ?>
|
||||
<option value="<?=$gemeinde->id?>" <?=($filter['gemeinde_id'] == $gemeinde->id) ? "selected='selected'" : ""?>><?=$gemeinde->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="<?=(!array_key_exists("network_id", $filter) || $filter['network_id'] !== "null") ? "hidden" : ""?>" id="filter-gemeinde-text">
|
||||
<label class="form-label" for="filter_gemeinde">Gemeinde</label>
|
||||
<input type="text" class="form-control" name="filter[gemeinde]" id="filter_gemeinde" value="<?=$filter['gemeinde']?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<div class="<?=(array_key_exists("network_id", $filter) && $filter['network_id'] == "null") ? "hidden" : ""?>" id="filter-ortschaft-id">
|
||||
<label class="form-label" for="filter_ortschaft_id">Ortsteil</label>
|
||||
<select name="filter[ortschaft_id]" id="filter_ortschaft_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($ortschaften as $ortschaft): ?>
|
||||
<option value="<?=$ortschaft->id?>" <?=($filter['ortschaft_id'] == $ortschaft->id) ? "selected='selected'" : ""?>><?=$ortschaft->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="<?=(!array_key_exists("network_id", $filter) || $filter['network_id'] !== "null") ? "hidden" : ""?>" id="filter-ortschaft-text">
|
||||
<label class="form-label" for="filter_ortschaft">Ortsteil</label>
|
||||
<input type="text" class="form-control" name="filter[ortschaft]" id="filter_ortschaft" value="<?=$filter['ortschaft']?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_street">Strasse</label>
|
||||
<input type="text" class="form-control" name="filter[street]" id="filter_street" value="<?=$filter['street']?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_oaid">OAID</label>
|
||||
<input type="text" class="form-control" name="filter[oaid]" id="filter_oaid" value="<?=$filter['oaid']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_adrcd">Adrcd (GWR)</label>
|
||||
<input type="text" class="form-control" name="filter[adrcd]" id="filter_adrcd" value="<?=$filter['adrcd']?>" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_extref">extref</label>
|
||||
<input type="text" class="form-control" name="filter[extref]" id="filter_extref" value="<?=$filter['extref']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_rollout">Rollout Jahr</label>
|
||||
<input type="text" class="form-control" name="filter[rollout]" id="filter_rollout" value="<?=$filter['rollout']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_rollout_info">Rollout Info</label>
|
||||
<input type="text" class="form-control" name="filter[rollout_info]" id="filter_rollout_info" value="<?=$filter['rollout_info']?>" />
|
||||
</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("AddressDB")?>">Filter zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller GWR-Adressen</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?=self::getUrl("AddressDB", "add")?>"><i class="fas fa-plus"></i> Neue Adresse anlegen</a>
|
||||
<a class="btn btn-outline-violett mb-2" href="<?=self::getUrl("AddressDB", "add")?>"><i class="fas fa-marker"></i> Bulk update</a>
|
||||
|
||||
</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>Netzgebiet</th>
|
||||
<th>Adrcd</th>
|
||||
<th>OAID</th>
|
||||
<th>extref</th>
|
||||
<th>PLZ</th>
|
||||
<th>Gemeinde</th>
|
||||
<th>Ortsteil</th>
|
||||
<th>Straße</th>
|
||||
<th>Hausnummer</th>
|
||||
<th>Rollout Jahr</th>
|
||||
<th>Rollout Info</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($addresses as $address): ?>
|
||||
<tr>
|
||||
<td><?=$address->netzgebiet->name?></td>
|
||||
<td><?=$address->adrcd?></td>
|
||||
<td><?=$address->oaid?></td>
|
||||
<td><?=$address->extref?></td>
|
||||
<td><?=$address->plz->plz?></td>
|
||||
<td><?=$address->ortschaft->gemeinde->name?></td>
|
||||
<td><?=$address->ortschaft->name?></td>
|
||||
<td><?=$address->strasse->name?></td>
|
||||
<td><?=$address->hausnummer?></td>
|
||||
<td><?=$address->rollout?></td>
|
||||
<td><?=$address->rollout_info?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<?php if($me->is("Admin")): ?>
|
||||
<a href="<?=self::getUrl("AddressDB", "edit", ["id" => $address->id])?>"><i class="far fa-edit" title="Adresse Bearbeiten"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</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>
|
||||
$('#filter_network_id').change(function() {
|
||||
if($('#filter_network_id').val() === "null") {
|
||||
$('#filter-gemeinde-id').hide();
|
||||
$('#filter-gemeinde-text').show();
|
||||
$('#filter-ortschaft-id').hide();
|
||||
$('#filter-ortschaft-text').show();
|
||||
|
||||
$('#filter-gemeinde-id option:first').prop("selected", "selected");
|
||||
$('#filter-ortschaft-id option:first').prop("selected", "selected");
|
||||
} else {
|
||||
$('#filter-gemeinde-text').hide();
|
||||
$('#filter-gemeinde-id').show();
|
||||
$('#filter-ortschaft-text').hide();
|
||||
$('#filter-ortschaft-id').show();
|
||||
}
|
||||
$('#filter_gemeinde').val("");
|
||||
$('#filter_ortschaft').val("");
|
||||
});
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -56,7 +56,7 @@
|
||||
<input type="text" class="form-control" name="filter[product_name]" id="filter_product_name" value="<?=$filter['product_name']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_show_canceled">Gekündigte Produkte</label>
|
||||
<select class="form-control" name="filter[show_canceled]" id="filter_show_canceled">
|
||||
<option value="0" <?=($filter['show_canceled'] == 0) ? "selected='selected'" : ""?>>Ausblenden</option>
|
||||
@@ -110,7 +110,7 @@
|
||||
<tr>
|
||||
<td><a href="<?=self::getUrl("Contract", "view", ["id" => $contract->id])?>"><?=$contract->id?></a></td>
|
||||
<td><a href="<?=self::getUrl("Address", "View", ["id" => $contract->owner_id])?>" target="_blank"><i class="far fa-eyes" title="Kunde in neuem Tab anzeigen"></i></a> <?=$contract->owner->getCompanyOrName()?></td>
|
||||
<td><a href="<?=self::getUrl("Contract", "view", ["id" => $contract->id])?>"><?=$contract->product->name?></a></td>
|
||||
<td><a href="<?=self::getUrl("Contract", "view", ["id" => $contract->id])?>"><?=$contract->product_name?></a></td>
|
||||
<td><a href="<?=self::getUrl("Contract", "view", ["id" => $contract->id])?>"><?=$contract->matchcode?></a></td>
|
||||
<!--<td>
|
||||
<?php if($contract->termination_id): ?>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("User")?>"><i class="fad fa-users text-info"></i> Benutzer</a></li>
|
||||
|
||||
<li class="has-sub-submenu font-weight-bold mt-1"><a>Grundstammdaten</a></li>
|
||||
<li><a href="<?=self::getUrl("AddressDB")?>"><i class="fas fa-city text-info"></i> GWR / AddressDB</a></li>
|
||||
<li><a href="<?=self::getUrl("Producttech")?>"><i class="fad fa-microchip text-info"></i> Technologien</a></li>
|
||||
<!--<li><a href="<?=self::getUrl("Contractconfig")?>"><i class="fad fa-gear text-info"></i> ContractConfig</a></li>-->
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ if($mfPagination_pagecount < 12) {
|
||||
$mfPagination_baseurl_params['s'] = $i * $pagination['count'];
|
||||
|
||||
if(($i == 0 || $i == $mfPagination_pagecount) || ($i >= $show_from && $i <= $show_to)) {
|
||||
$log->debug("show_from: $show_from, show_to: $show_to");
|
||||
//$log->debug("show_from: $show_from, show_to: $show_to");
|
||||
|
||||
$page = [
|
||||
's' => $i * $pagination['count'],
|
||||
|
||||
Reference in New Issue
Block a user