Added adding POPs
This commit is contained in:
@@ -129,6 +129,7 @@
|
||||
<option value="pipeworker" <?=(array_key_exists("pipeworker", $address->types)) ? "selected='selected'" : "pipeworker"?>><?=__("pipeworker")?></option>
|
||||
<option value="lineworker" <?=(array_key_exists("lineworker", $address->types)) ? "selected='selected'" : "lineworker"?>><?=__("lineworker")?></option>
|
||||
<option value="netoperator" <?=(array_key_exists("netoperator", $address->types)) ? "selected='selected'" : "netoperator"?>><?=__("netoperator")?></option>
|
||||
<option value="planner" <?=(array_key_exists("planner", $address->types)) ? "selected='selected'" : "planner"?>><?=__("planner")?></option>
|
||||
<option value="support" <?=(array_key_exists("support", $address->types)) ? "selected='selected'" : "support"?>><?=__("support")?></option>
|
||||
<option value="billing" <?=(array_key_exists("billing", $address->types)) ? "selected='selected'" : ""?>><?=__("billing")?></option>
|
||||
<option value="employee" <?=(array_key_exists("employee", $address->types)) ? "selected='selected'" : ""?>><?=__("employee")?></option>
|
||||
|
||||
@@ -65,21 +65,21 @@
|
||||
<ul class="nav nav-pills navtab-bg nav-justified">
|
||||
<li class="nav-item"><a class="nav-link active" href="#net-detail-<?=$network->id?>-detail" data-toggle="tab" aria-expanded="false">Details</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#net-detail-<?=$network->id?>-pops" data-toggle="tab" aria-expanded="false">POPs</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#net-detail-<?=$network->id?>-third" data-toggle="tab" aria-expanded="false">Noawos</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#net-detail-<?=$network->id?>-third" data-toggle="tab" aria-expanded="false">Berechtigungen</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="net-detail-<?=$network->id?>-detail" class="tab-pane show active">
|
||||
<h4>Details zu <strong><?=$network->name?></strong></h4>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr>
|
||||
<table class="table table-bordered">
|
||||
<tr class="bg-white">
|
||||
<th>Name</th>
|
||||
<td><?=$network->name?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="bg-white">
|
||||
<th>Besitzer</th>
|
||||
<td><?=$network->owner->getCompanyOrName()?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="bg-white">
|
||||
<th>Interne Notiz</th>
|
||||
<td><?=nl2br($network->note)?></td>
|
||||
</tr>
|
||||
@@ -89,15 +89,33 @@
|
||||
<h4>POPs in <strong><?=$network->name?></strong></h4>
|
||||
|
||||
<?php if(is_array($network->pops) && count($network->pops)): ?>
|
||||
|
||||
<table class="table" >
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>GPS (Breite, Länge)</th>
|
||||
<th>Standortinfo</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($network->pops as $pop): ?>
|
||||
<tr>
|
||||
<td><?=$pop->name?></td>
|
||||
<td><?=$pop->gps_lat?>, <?=$pop->gps_long?></td>
|
||||
<td><?=$pop->location?></td>
|
||||
<td class="controls" style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Pop", "edit", ["id" => $pop->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Pop", "delete", ["id" => $pop->id])?>" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p><i>Keine POPs vorhanden</i></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<a class="btn btn-primary" href="<?=self::getUrl("Pop", "add")?>"><i class="fas fa-plus"></i> Neuen POP anlegen</a>
|
||||
<a class="btn btn-primary" href="<?=self::getUrl("Pop", "add", ['network_id' => $network->id])?>"><i class="fas fa-plus"></i> Neuen POP anlegen</a>
|
||||
</div>
|
||||
<div id="net-detail-<?=$network->id?>-third" class="tab-pane">
|
||||
<h4>3</h4>
|
||||
<h4>Berechtigungen</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- 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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Network")?>">Netzgebiete</a></li>
|
||||
<li class="breadcrumb-item">POP</li>
|
||||
<li class="breadcrumb-item active"><?=($pop->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title"><?=($pop->id) ? "POP bearbeiten" : "Neuer POP" ?></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"><?=($pop->id) ? "POP bearbeiten" : "Neuer POP"?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("Pop", "save")?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<input type="hidden" name="id" value="<?=$pop->id?>" />
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="network_id">Netzgebiet</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="network_id" id="owner_id">
|
||||
<option></option>
|
||||
<?php foreach($networks as $network): ?>
|
||||
<option value="<?=$network->id?>" <?=($pop->network_id == $network->id) ? "selected='selected'" : ""?>><?=($network->name)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="name">Name</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="name" id="name" value="<?=$pop->name?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="gps_lat">GPS Breite</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="gps_lat" id="name" value="<?=$pop->gps_lat?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="gps_long">GPS Länge</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="gps_long" id="name" value="<?=$pop->gps_long?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="location">Standortinfo</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="location" id="name" value="<?=$pop->location?>">
|
||||
</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"><?=$pop->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>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#parent_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
$("#addresstypes").select2();
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
Reference in New Issue
Block a user