Added Terminations to buildings
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -183,9 +180,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#parent_id").select2({
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -86,8 +83,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,8 +1,4 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -292,10 +288,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#network_id").select2({placeholder: ""});
|
||||
$("#pop_id").select2({placeholder: "", allowClear: true,});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
@@ -43,22 +42,128 @@
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($buildings as $building): ?>
|
||||
<tr>
|
||||
<td><?=$building->network->name?></td>
|
||||
<td><?=$building->pop->name?></td>
|
||||
<td><?=$building->type->name?></td>
|
||||
<td><?=$building->code?></td>
|
||||
<td><?=$building->oan_id?></td>
|
||||
<td>
|
||||
<tr class="building-list-tr" id="building-<?=$building->id?>">
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->network->name?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->pop->name?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->type->name?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->code?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->oan_id?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)">
|
||||
<?=$building->street?><br />
|
||||
<?=$building->zip?> <?=$building->city?>
|
||||
</td>
|
||||
<td><?=$building->units?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->units?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Building", "edit", ["id" => $building->id])?>"><i class="far fa-edit" title="Objekt Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Building", "delete", ["id" => $building->id])?>" class="text-danger" onclick="if(!confirm('Objekt wirklich löschen?')) return false;" title="Objekt Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="building-detail-<?=$building->id?>" style="display:none; background-color:#fff">
|
||||
<td colspan="8">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Anschlüsse im Objekt <strong><?=$building->code?></strong></h4>
|
||||
<p>
|
||||
<?=$building->street?><br />
|
||||
<?=$building->zip?> <?=$building->city?>
|
||||
</p>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<?php if(is_array($building->terminations) && count($building->terminations)): ?>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Bezeichung</th>
|
||||
<th>Kontakt</th>
|
||||
<th>Telefon</th>
|
||||
<th>Email</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($building->terminations as $term): ?>
|
||||
|
||||
<tr>
|
||||
<td><?=$term->code?></td>
|
||||
<td>
|
||||
|
||||
<span id="term-name-<?=$term->id?>-text"><?=$term->name?></span>
|
||||
<div class="input-group" id="term-name-<?=$term->id?>-input" style="display:none">
|
||||
<input type="text" class="form-control" id="term-name-<?=$term->id?>-input" value="<?=$term->name?>" />
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'name')"><i class="fas fa-check"></i></button>
|
||||
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'name')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-right" id="term-name-<?=$term->id?>-edit">
|
||||
<i class="far fa-edit text-pink" style="cursor:pointer" title="Bezeichnung Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'name')"></i>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<span id="term-contact-<?=$term->id?>-text"><?=$term->contact?></span>
|
||||
<div class="input-group" id="term-contact-<?=$term->id?>-input" style="display:none">
|
||||
<input type="text" class="form-control" value="<?=$term->contact?>" />
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'contact')"><i class="fas fa-check"></i></button>
|
||||
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'contact')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-right" id="term-contact-<?=$term->id?>-edit">
|
||||
<i class="far fa-edit text-pink" style="cursor:pointer" title="Kontakt Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'contact')"></i>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<span id="term-phone-<?=$term->id?>-text"><?=$term->phone?></span>
|
||||
<div class="input-group" id="term-phone-<?=$term->id?>-input" style="display:none">
|
||||
<input type="text" class="form-control" value="<?=$term->phone?>" />
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'phone')"><i class="fas fa-check"></i></button>
|
||||
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'phone')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-right" id="term-phone-<?=$term->id?>-edit">
|
||||
<i class="far fa-edit text-pink" style="cursor:pointer" title="Telefon Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'phone')"></i>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<span id="term-email-<?=$term->id?>-text"><?=$term->email?></span>
|
||||
<div class="input-group" id="term-email-<?=$term->id?>-input" style="display:none">
|
||||
<input type="text" class="form-control" value="<?=$term->email?>" />
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'email')"><i class="fas fa-check"></i></button>
|
||||
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'email')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-right" id="term-email-<?=$term->id?>-edit">
|
||||
<i class="far fa-edit text-pink" style="cursor:pointer" title="Email Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'email')"></i>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Building", "delete", ["id" => $term->id])?>" class="text-danger" onclick="if(!confirm('Objekt wirklich löschen?')) return false;" title="Objekt Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none;">
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
@@ -67,8 +172,56 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function toggleBuilding(id) {
|
||||
$('#building-detail-' + id).toggle();
|
||||
if($('#building-detail-' + id).is(":hidden")) {
|
||||
$('#building-' + id).removeClass("table-info");
|
||||
$('#building-' + id).removeClass("text-info");
|
||||
} else {
|
||||
$('#building-' + id).addClass("text-info");
|
||||
$('#building-' + id).addClass("table-info");
|
||||
}
|
||||
}
|
||||
|
||||
function toggleTerminationControl(id, type) {
|
||||
$("#term-" + type + "-" + id + "-text").toggle();
|
||||
$("#term-" + type + "-" + id + "-input").toggle();
|
||||
$("#term-" + type + "-" + id + "-edit").toggle();
|
||||
}
|
||||
|
||||
function saveTerminationControl(id, type) {
|
||||
if(!Number.isInteger(id) || id < 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var value = $("#term-" + type + "-" + id + "-input input[type=text]").val();
|
||||
|
||||
$.post("<?=self::getUrl("Termination","Api")?>",
|
||||
{
|
||||
'do': "setValue",
|
||||
id: id,
|
||||
type: type,
|
||||
value: value
|
||||
},
|
||||
function(success) {
|
||||
if(success.status == "OK") {
|
||||
$("#term-" + type + "-" + id + "-text").text(value);
|
||||
} else {
|
||||
console.log("error saving (" + type + ", '" + value + "')");
|
||||
}
|
||||
|
||||
toggleTerminationControl(id, type);
|
||||
},
|
||||
'json');
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,8 +1,5 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -20,8 +17,4 @@
|
||||
<!-- end page title -->
|
||||
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,8 +1,5 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -82,10 +79,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#parent_id").select2({
|
||||
allowClear: true,
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -260,10 +257,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<script type="text/javascript">
|
||||
function toggleNetwork(id) {
|
||||
$('#network-detail-' + id).toggle();
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -132,10 +129,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#parent_id").select2({
|
||||
allowClear: true,
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -239,9 +236,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#productgroup_id").select2({
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -68,8 +65,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,8 +1,4 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -183,9 +179,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#productgroup_id").select2({
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -55,8 +52,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -3,9 +3,6 @@
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -78,10 +75,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#address_id").select2({
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -74,11 +71,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
|
||||
<!-- Control Sidebar -->
|
||||
<aside class="control-sidebar control-sidebar-dark">
|
||||
<!-- Control sidebar content goes here -->
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
</div> <!-- end container-fluid -->
|
||||
</div>
|
||||
<!-- end wrapper -->
|
||||
|
||||
<!-- Footer Start -->
|
||||
<footer class="footer">
|
||||
<div class="container-fluid">
|
||||
|
||||
@@ -36,4 +36,55 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/")."/topbar.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/")."/menu.php"); ?>
|
||||
</header>
|
||||
<!-- End Navigation Bar-->
|
||||
<!-- End Navigation Bar-->
|
||||
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
<?php if(isset($_flash_set) && $_flash_set == true): ?>
|
||||
<?php if(isset($mfError) && !empty($mfError)): ?>
|
||||
<div class="row mr-1">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-10 alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h5><i class="icon fas fa-ban"></i> Fehler</h5>
|
||||
<?=$mfError?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(isset($mfWarning) && !empty($mfWarning)): ?>
|
||||
<div class="row mr-1">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-10 alert alert-warning alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h5><i class="icon fas fa-exclamation-triangle"></i> Warnung</h5>
|
||||
<?=$mfWarning?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(isset($mfInfo) && !empty($mfInfo)): ?>
|
||||
<div class="row mr-1">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-10 alert alert-info alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h5><i class="icon fas fa-info"></i> Info</h5>
|
||||
<?=$mfInfo?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(isset($mfSuccess) && !empty($mfSuccess)): ?>
|
||||
<div class="row mr-1">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-10 alert alert-success alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h5><i class="icon fas fa-check"></i> Erfolgreich</h5>
|
||||
<?=$mfSuccess?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user