Merge branch 'spidev' into 'master'
Faserplanung See merge request fronk/thetool!334
This commit is contained in:
@@ -0,0 +1,244 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- 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("FiberPlanDispatcher") ?>">Verteiler/Schächte</a></li>
|
||||
<li class="breadcrumb-item active"><?= ($fiberplandispatchers->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title"><?= ($fiberplandispatchers->id) ? "Verteiler/Schacht bearbeiten" : "Neuer Verteiler/Schacht" ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<?php
|
||||
if (!$me->permissions->isAdmin) {
|
||||
foreach ($networkaddresses as $networkaddress) {
|
||||
if ($me->address->id == $networkaddress->address_id) {
|
||||
$allowedNetworks[$networkaddress->network_id] = "ok";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<style>
|
||||
.fa-circle-plus {
|
||||
color: #00b125;
|
||||
cursor: pointer;
|
||||
font-size: 17px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.remove-sleeve {
|
||||
cursor: pointer;
|
||||
color: #ff0606;
|
||||
font-size: 17px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<h4 class="header-title mb-2"><?= ($fiberplandispatchers->id) ? "Verteiler/Schacht bearbeiten" : "Neuer Verteiler/Schacht" ?></h4>
|
||||
<div class="col-12">
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("FiberPlanDispatcher", "save") ?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<input type="hidden" name="id" value="<?= $fiberplandispatchers->id ?>"/>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-4 col-form-label" for="network_id">Netzgebiet
|
||||
*</label>
|
||||
<div class="col-lg-5">
|
||||
|
||||
<select class="select2 form-control "
|
||||
name="network_id" id="network_id">
|
||||
<option value=""> </option>
|
||||
<?php foreach ($networks as $key => $network):
|
||||
if (!$me->permissions->isAdmin) {
|
||||
if (!array_key_exists($network->id, $allowedNetworks)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<option value="<?= $network->id ?>" <?= ($fiberplandispatchers->network_id == $network->id) ? "selected='selected'" : "" ?>><?= ($network->name) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-4 col-form-label" for="gps_lat">Beschreibung
|
||||
*</label>
|
||||
<div class="col-lg-4">
|
||||
<input type="text" required="required" step="any"
|
||||
class="form-control" name="description" id="description"
|
||||
value="<?= $fiberplandispatchers->description ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-4 col-form-label" for="object_type">Objekt Typ
|
||||
*</label>
|
||||
<div class="col-lg-4">
|
||||
<select class="select2 form-control" required="required"
|
||||
name="object_type" id="object_type">
|
||||
<option value="1" <?= ($fiberplandispatchers->object_type == '1') ? "selected='selected'" : "" ?>>
|
||||
Verteiler
|
||||
</option>
|
||||
<option value="2" <?= ($fiberplandispatchers->object_type == '2') ? "selected='selected'" : "" ?>>
|
||||
Schacht
|
||||
</option>
|
||||
<option value="3" <?= ($fiberplandispatchers->object_type == '3') ? "selected='selected'" : "" ?>>
|
||||
Greenfield
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-4 col-form-label" for="type">Typ</label>
|
||||
<div class="col-lg-4">
|
||||
<textarea id="type" name="type"
|
||||
class="form-control"><?= $fiberplandispatchers->type ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-4 col-form-label" for="gps_lat">GPS
|
||||
Breite/Länge</label>
|
||||
<div class="col-lg-3">
|
||||
<input type="number" step="any" class="form-control" name="gps_lat"
|
||||
id="gps_lat" placeholder="GPS Breite"
|
||||
value="<?= $fiberplandispatchers->gps_lat ?>">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
<input type="number" step="any" class="form-control" name="gps_long"
|
||||
id="gps_long" placeholder="GPS Länge"
|
||||
value="<?= $fiberplandispatchers->gps_long ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-4 col-form-label" for="comment">Kommentar</label>
|
||||
<div class="col-lg-5">
|
||||
<textarea id="comment" name="comment"
|
||||
class="form-control"><?= $fiberplandispatchers->comment ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sleeves-main" class="col-6" <?= ($fiberplandispatchers->object_type == 2) ? "" : 'style="display:none"' ?>>
|
||||
<div class="row">
|
||||
<h4>Muffe(n) <i class="fa-regular fa-circle-plus add-sleeve"></i>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="sleeves-div">
|
||||
<?php
|
||||
if ($sleeves):
|
||||
foreach ($sleeves as $sleeve) : ?>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-form-label"
|
||||
>Muffe <i data-popid="5"
|
||||
class="fa-regular fa-circle-minus remove-sleeve"></i></label>
|
||||
<div class="col-lg-4">
|
||||
<input type="text" required="required" step="any"
|
||||
class="form-control" name="sleeves[]"
|
||||
value="<?= $sleeve['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</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>
|
||||
<a href="<?= self::getUrl("FiberPlanDispatcher") ?>">
|
||||
<button type="button" class="btn btn-secondary">Abbrechen</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#network_id").select2({placeholder: ""});
|
||||
$("#object_type").select2();
|
||||
|
||||
// disable mousewheel on a input number field when in focus
|
||||
$('form').on('focus', 'input[type=number]', function (e) {
|
||||
$(this).on('wheel.disableScroll', function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
});
|
||||
$('form').on('blur', 'input[type=number]', function (e) {
|
||||
$(this).off('wheel.disableScroll')
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$("body").on("click", ".remove-sleeve", function () {
|
||||
$(this).closest('.form-group').remove();
|
||||
});
|
||||
|
||||
$("body").on("change", "#object_type", function (){
|
||||
if ($(this).val()=="2")
|
||||
{
|
||||
$('#sleeves-main').show()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#sleeves-main').hide()
|
||||
$('#sleeves-div').empty()
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("body").on("click", ".add-sleeve", function () {
|
||||
if ($('#sleeves-div').find('.form-group').length < 5) {
|
||||
$('#sleeves-div').append(`<div class="form-group row">
|
||||
<label class="col-lg-3 col-form-label"
|
||||
>Muffe <i data-popid="5" class="fa-regular fa-circle-minus remove-sleeve"></i></label>
|
||||
<div class="col-lg-4">
|
||||
<input type="text" required="required" step="any"
|
||||
class="form-control" name="sleeves[]"
|
||||
value="">
|
||||
</div>
|
||||
</div>`);
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
})
|
||||
;
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
$objecttype[1] = 'Verteiler';
|
||||
$objecttype[2] = 'Schacht';
|
||||
$objecttype[3] = 'Greenfield';
|
||||
|
||||
?>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- 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">Verteiler und Schächte</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Verteiler und Schächte</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Verteiler und Schächte</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?= self::getUrl("FiberPlanDispatcher", "add") ?>"><i
|
||||
class="fas fa-plus"></i> Neuen Verteiler/Schacht anlegen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination.php"); ?>
|
||||
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination-summary.php"); ?>
|
||||
|
||||
<table id="datatable" class="table table-striped table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Netzgebiet</th>
|
||||
<th class="text-center">Beschreibung</th>
|
||||
<th class="text-center">Objektart</th>
|
||||
<th class="text-center">Type</th>
|
||||
<th class="text-center">Koordinaten</th>
|
||||
<th class="text-center">Kommentar</th>
|
||||
<th class="edit-weight"></th>
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($fiberplandispatchers as $fiberplandispatcher): ?>
|
||||
<?php
|
||||
if ($fiberplandispatcher->gps_lat) {
|
||||
$mapslink = '<a
|
||||
title="Google-Maps: ' . $fiberplandispatcher->gps_lat . ' , ' . $fiberplandispatcher->gps_long . '"
|
||||
class="mapsLink"
|
||||
href="http://maps.google.com/?q=' . $fiberplandispatcher->gps_lat . ' , ' . $fiberplandispatcher->gps_long . '"
|
||||
target="_blank">' . rtrim($fiberplandispatcher->gps_lat, 0) . ' , ' . rtrim($fiberplandispatcher->gps_long, 0) . '</a>';
|
||||
} else {
|
||||
$mapslink = 'N/A';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?= $fiberplandispatcher->network->name ?></td>
|
||||
<td><?= $fiberplandispatcher->description ?></td>
|
||||
<td class="text-center"><?= $objecttype[$fiberplandispatcher->object_type] ?></td>
|
||||
<td class="text-left"><?= nl2br($fiberplandispatcher->type) ?></td>
|
||||
<td class="text-center"><?= $mapslink ?></td>
|
||||
<td class="text-left"><?= nl2br($fiberplandispatcher->comment) ?></td>
|
||||
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?= self::getUrl("FiberPlanDispatcher", "edit", ["id" => $fiberplandispatcher->id]) ?>"><i
|
||||
class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?= self::getUrl("FiberPlanDispatcher", "delete", ["id" => $fiberplandispatcher->id]) ?>"
|
||||
onclick="if(!confirm('Verteiler/Schacht wirklich löschen?')) return false;"
|
||||
class="text-danger"
|
||||
title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [6];
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -0,0 +1,530 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
|
||||
<?php
|
||||
$markers = [];
|
||||
$typeOption[1] = "Einzel";
|
||||
$typeOption[2] = "Schutzrohr";
|
||||
$typeOption[3] = "Verband";
|
||||
$starting_pointOption[1] = "Greenfield";
|
||||
$starting_pointOption[2] = "POP";
|
||||
$starting_pointOption[3] = "Building";
|
||||
$starting_pointOption[4] = "Schacht-Verteiler";
|
||||
$fiberplanpipestypes[1] = "Verteiler";
|
||||
$fiberplanpipestypes[2] = "Schacht";
|
||||
$fiberplanpipestypes[3] = "Greenfield";
|
||||
$fiberplanpipestypes[4] = "Abzweigepunkt";
|
||||
|
||||
$dimension_v1Option[1] = "MR7";
|
||||
$dimension_v1Option[2] = "MR14";
|
||||
$dimension_v1Option[3] = "MR16";
|
||||
$dimension_v1Option[4] = "MR20";
|
||||
$dimension_v1Option[5] = "PE32";
|
||||
$dimension_v1Option[6] = "PE40";
|
||||
$dimension_v1Option[7] = "PE50";
|
||||
$dimension_v1Option[8] = "KSR50";
|
||||
$dimension_v1Option[9] = "KSR80";
|
||||
$dimension_v1Option[10] = "KSR100";
|
||||
$dimension_v2Option[1] = "Anzahl";
|
||||
$dimension_v2Option[2] = "Dimenson";
|
||||
$dimension_v2Option[3] = "Farben";
|
||||
$state[10] = 'Geplant';
|
||||
$state[20] = 'Umsetzung';
|
||||
$state[30] = 'Fertiggestellt';
|
||||
foreach ($pipworkeraddresses as $pipworkeraddress):
|
||||
$Pipeworkers[$pipworkeraddress->id] = $pipworkeraddress->company;
|
||||
|
||||
endforeach;
|
||||
|
||||
foreach ($networks as $network):
|
||||
$Network[$network->id] = $network->name;
|
||||
endforeach;
|
||||
|
||||
$allNetworks[$fiberplanpipes->startpoint_network_id] = $Network[$fiberplanpipes->startpoint_network_id];
|
||||
$allNetworks[$fiberplanpipes->endpoint_network_id] = $Network[$fiberplanpipes->endpoint_network_id];
|
||||
|
||||
if ($fiberplanpipes->address_id) {
|
||||
$responsible = $Pipeworkers[$fiberplanpipes->address_id];
|
||||
} else {
|
||||
$responsible = "Person";
|
||||
}
|
||||
if ($fiberplanpipes->type == "3") {
|
||||
$name = "";
|
||||
if ($fiberplanpipes->fiberPlanPipeTemplate->pipe7x4 && $fiberplanpipes->fiberPlanPipeTemplate->pipe14x10) {
|
||||
$name = $fiberplanpipes->fiberPlanPipeTemplate->fiberPlanPipeManufacturer->name . " " . $fiberplanpipes->fiberPlanPipeTemplate->pipe7x4 . "*7x4" . "/" . $fiberplanpipes->fiberPlanPipeTemplate->pipe14x10 . "*14x10";
|
||||
} else if ($fiberplanpipes->fiberPlanPipeTemplate->pipe7x4) {
|
||||
$name = $fiberplanpipes->fiberPlanPipeTemplate->fiberPlanPipeManufacturer->name . " " . $fiberplanpipes->fiberPlanPipeTemplate->pipe7x4 . "*7x4";
|
||||
} else if ($fiberplanpipes->fiberPlanPipeTemplate->pipe14x10) {
|
||||
$name = $fiberplanpipes->fiberPlanPipeTemplate->fiberPlanPipeManufacturer->name . " " . $fiberplanpipes->fiberPlanPipeTemplate->pipe14x10 . "*14x10";
|
||||
}
|
||||
$typeDescription = $name;
|
||||
//
|
||||
} else {
|
||||
$typeDescription = $dimension_v1Option[$fiberplanpipes->type_description];
|
||||
}
|
||||
|
||||
?>
|
||||
<style>
|
||||
#map {
|
||||
height: 600px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card-border {
|
||||
border-left: 1px solid #428bca;
|
||||
border-left-width: 5px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.fiber-rack-div {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.fiber-color {
|
||||
color: #0d6efd;
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
|
||||
}
|
||||
|
||||
.fiber-module-div {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 5px;
|
||||
border: 1px solid #e3e3e3;
|
||||
}
|
||||
|
||||
.sp-border-rl {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
|
||||
}
|
||||
|
||||
.sp-table-border {
|
||||
border: 1px solid #bfbfbf;
|
||||
border-radius: 10px;
|
||||
display: inline;
|
||||
|
||||
}
|
||||
|
||||
.sp-table-border > tbody {
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
|
||||
.sp-table-border > thead td {
|
||||
padding: 10px 0px 0px 0px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.sp-port-lines {
|
||||
width: 50px;
|
||||
border-top: 1px solid #000;
|
||||
border-bottom: 1px solid #000;
|
||||
|
||||
}
|
||||
|
||||
#olt-splitter td {
|
||||
height: 30px;
|
||||
width: 150px;
|
||||
border: 1px solid #bfbfbf;
|
||||
margin-top: 15px;
|
||||
display: block;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#olt-splitter-table thead {
|
||||
padding: 10px 0px 0px 0px;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
|
||||
}
|
||||
|
||||
#olt-splitter-table thead td {
|
||||
padding-top: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sp-splitter-count {
|
||||
padding: 3px 10px 3px 10px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.sp-splitter-count-left {
|
||||
padding: 3px 0px 3px 10px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.sp-splitter-count-right {
|
||||
padding: 3px 10px 3px 0px;
|
||||
width: 50px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.sp-splitter-count-edit {
|
||||
-ms-user-select: None;
|
||||
-moz-user-select: None;
|
||||
-webkit-user-select: None;
|
||||
user-select: None;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sp-splitter-count-show {
|
||||
width: 46px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
padding-top: 2px;
|
||||
-ms-user-select: None;
|
||||
-moz-user-select: None;
|
||||
-webkit-user-select: None;
|
||||
user-select: None;
|
||||
}
|
||||
|
||||
.sp-white-border {
|
||||
border-color: #fff !important;
|
||||
}
|
||||
|
||||
.sp-ont-text {
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
.fa-circle-check {
|
||||
color: #07ad2b;
|
||||
}
|
||||
|
||||
.fa-circle-xmark {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.fa-rotate-right {
|
||||
color: #0d6efd;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.ont-refresh-span, .ontdetail-refresh-span {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
margin-right: 50px;
|
||||
min-height: 1px;
|
||||
color: #0d6efd;
|
||||
}
|
||||
|
||||
.text-decoration-underline {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.condensed-ont th {
|
||||
padding: 6px 0.85rem 6px 0.85rem !important;
|
||||
}
|
||||
|
||||
.condensed-ont td {
|
||||
padding: 6px 0.85rem 6px 0.85rem !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<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("FiberPlanPipe") ?>">Rohrverzeichnis</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">Kabelverzeichnis Detail</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Kabel: <span
|
||||
class="font-weight-normal ml-1"><?= $fiberplanpipes->description ?></span>
|
||||
<span class="ml-2">
|
||||
<a href="<?= self::getUrl("FiberPlanPipe", "edit", ["id" => $fiberplanpipes->id, 'returnto' => "fiberplanpipe-detail"]) ?>">
|
||||
<button class="btn btn-primary">Bearbeiten</button>
|
||||
</a>
|
||||
</span></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-4 card-border">
|
||||
<div>
|
||||
<h4>Allgemeine Informationen </h4>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="w-50">Bezeichnung</th>
|
||||
<td><?= $fiberplanpipes->description ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>GisId</th>
|
||||
<td><?= $fiberplanpipes->gisid ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Länge (m)</th>
|
||||
<td>
|
||||
<?= $fiberplanpipes->length ?> Meter
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Netzgebiet (e)</th>
|
||||
<td><?= implode(', ', $allNetworks) ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Rohrtyp</th>
|
||||
<td><?= $typeOption[$fiberplanpipes->type] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Rohrbezeichnung</th>
|
||||
<td><?= $typeDescription ?> </td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-4 ">
|
||||
<div>
|
||||
<h4> </h4>
|
||||
</div>
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<td><?= $state[$fiberplanpipes->status] ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Zuständig</th>
|
||||
<td><?= $responsible ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Kontakt</th>
|
||||
<td><?= $fiberplanpipes->responsible_text ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Bemerkung</th>
|
||||
<td><?= nl2br($fiberplanpipes->comment) ?> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-3 ">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row pb-3 pt-4 ">
|
||||
|
||||
<div class="col-12 text-center card-border">
|
||||
<div>
|
||||
<h4 class="text-left mb-3">Schematische Darstellung <i data-toggle="modal"
|
||||
data-target="#pipemap"
|
||||
class="fa-duotone fa-map-location-dot font-24"
|
||||
style="--fa-primary-color: #fa0000; --fa-secondary-color: #232423;margin-left:5px;cursor:pointer"></i>
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
<div class="ml-2">
|
||||
<?php
|
||||
if ($fiberplanpipeendpoints) :
|
||||
$endpointcounter = count($fiberplanpipeendpoints);
|
||||
$counter = 1;
|
||||
foreach ($fiberplanpipeendpoints as $endpoint):
|
||||
if ($endpoint->pop_id) {
|
||||
$endpointname = '<a href="' . self::getUrl("Pop", "Detail", ["id" => $endpoint->pop->id]) . '" target="_blank">' . $endpoint->pop->name . '</a>';
|
||||
$endpointtype = "Pop";
|
||||
$gps_lat = $endpoint->pop->gps_lat;
|
||||
$gps_long = $endpoint->pop->gps_long;
|
||||
} elseif ($endpoint->fiberPlanDispatcher_id) {
|
||||
$endpointname = $endpoint->fiberPlanDispatcher->description;
|
||||
$endpointtype = $fiberplanpipestypes[$endpoint->fiberPlanDispatcher->object_type];
|
||||
$gps_lat = $endpoint->fiberPlanDispatcher->gps_lat;
|
||||
$gps_long = $endpoint->fiberPlanDispatcher->gps_long;
|
||||
}
|
||||
$coordinates = "";
|
||||
if ($gps_lat) {
|
||||
$coordinates = round($gps_lat, 5) . " , " . round($gps_long, 5);
|
||||
$coordinates = '<a title="Google-Maps: ' . $coordinates . '" class="mapsLink" href="http://maps.google.com/?q=' . $coordinates . '" target="_blank">' . $coordinates . '</a>';
|
||||
}
|
||||
?>
|
||||
<table class="sp-table-border float-left border-collapse: collapse;"
|
||||
style="min-height: 150px;">
|
||||
<thead style="display: inline;">
|
||||
<tr>
|
||||
<th colspan="3"
|
||||
class="text-center font-15">
|
||||
<div class="pt-2 pl-2 pr-2"><?= $endpointtype; ?></div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3"
|
||||
class="text-center font-15">
|
||||
<div class="pl-2 pr-2"><?= $endpointname; ?></div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3"
|
||||
class="text-center font-13">
|
||||
<div class="pb-2 pl-2 pr-2"><?= $coordinates ?></div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
if ($gps_lat) {
|
||||
$markers[] = array(
|
||||
"gps_lat" => $gps_lat,
|
||||
"gps_long" => $gps_long,
|
||||
"name" => $endpointname,
|
||||
);
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
if ($endpointcounter > $counter) :
|
||||
?>
|
||||
<table id="olt-port-table" class="float-left" style="width: 100px">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="height:40px;"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="olt-ports">
|
||||
<tr>
|
||||
<td data-oltport="0"
|
||||
class="font-13"><?= $fibers[$fiberplancables->fibers]['fibers']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-oltport="0" class="sp-port-lines"
|
||||
style="width: 70px; background-color: <?= $pipecolor; ?> ;height: <?= $pipeheight; ?>;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-oltport="0" class="font-13"><?= $pipesub; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
endif;
|
||||
$counter++;
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="pipemap" tabindex="-1" role="dialog" aria-labelledby="pipemap"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="pipemapLabel">Rohrverzeichnis</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($markers) :
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
var marker;
|
||||
var polylinec;
|
||||
var polyline;
|
||||
var map = L.map('map').setView([51.505, -0.09], 13);
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19
|
||||
}).addTo(map);
|
||||
L.MakiMarkers.accessToken = '<?=TT_MAPBOX_TILE_API_TOKEN?>';
|
||||
$(document).ready(function () {
|
||||
var locations = [<?php
|
||||
$counter = 0;
|
||||
$lat = 0;
|
||||
$long = 0;
|
||||
foreach ($markers as $marker):
|
||||
if ($counter > 0) echo ',';
|
||||
?>
|
||||
['<?= $marker['name'] ?>', <?= $marker['gps_lat'] ?>, <?= $marker['gps_long'] ?>]
|
||||
<?php
|
||||
$lat = $lat + $marker['gps_lat'];
|
||||
$long = $long + $marker['gps_long'];
|
||||
$counter++;
|
||||
endforeach;
|
||||
$lat = $lat / $counter;
|
||||
$long = $long / $counter;
|
||||
|
||||
?>
|
||||
];
|
||||
var startlat = <?=$lat ?>;
|
||||
var startlong = <?=$long ?>;
|
||||
console.log('<?=$lat . " " . $long ?>')
|
||||
|
||||
$('#pipemap').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
map.remove();
|
||||
map = L.map('map').setView([51.505, -0.09], 13);
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19
|
||||
}).addTo(map);
|
||||
var icon_name = "town";
|
||||
var icon_color = "#ec98a2";
|
||||
var icon = L.MakiMarkers.icon({icon: icon_name, color: icon_color, size: "l"});
|
||||
var oldlat;
|
||||
var oldlong;
|
||||
map.setView([startlat, startlong], 14)
|
||||
for (var i = 0; i < locations.length; i++) {
|
||||
marker = new L.marker([locations[i][1], locations[i][2]]).addTo(map)
|
||||
.bindPopup(locations[i][0]);
|
||||
|
||||
if (oldlong) {
|
||||
polylinec = [
|
||||
[oldlat, oldlong],
|
||||
[locations[i][1], locations[i][2]]
|
||||
];
|
||||
polyline = L.polyline(polylinec, {color: 'red'}).addTo(map);
|
||||
polyline = null;
|
||||
console.log(polylinec);
|
||||
}
|
||||
oldlong = locations[i][2];
|
||||
oldlat = locations[i][1];
|
||||
}
|
||||
|
||||
});
|
||||
$('#pipemap').on('shown.bs.modal', function (event) {
|
||||
map.invalidateSize();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -0,0 +1,469 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- 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("FiberPlanPipe") ?>">Rohrverzeichnisse</a></li>
|
||||
<li class="breadcrumb-item active"><?= ($fiberplanpipes->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title"><?= ($fiberplanpipes->id) ? "Rohrverzeichnis bearbeiten" : "Neuer Rohrverzeichnis" ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.fa-circle-plus {
|
||||
color: #00b125;
|
||||
cursor: pointer;
|
||||
font-size: 17px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.remove-endpoint {
|
||||
cursor: pointer;
|
||||
color: #ff0606;
|
||||
font-size: 17px;
|
||||
float: right;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
.fa-up {
|
||||
color: #0d6efd;
|
||||
font-size: 17px;
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
if (isset($_GET['returnto']) && $_GET['returnto'] == "fiberplanpipe-detail") {
|
||||
$cancelUrl = self::getUrl("FiberPlanPipe", "Detail", ["id" => $fiberplanpipes->id]);
|
||||
} else {
|
||||
$cancelUrl = self::getUrl("FiberPlanPipe");
|
||||
}
|
||||
?>
|
||||
<!-- end page title -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title mb-2"><?= ($fiberplanpipes->id) ? "Rohrverzeichnis bearbeiten" : "Neuer Rohrverzeichnis" ?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("FiberPlanPipe", "save", ["returnto" => $_GET["returnto"]]) ?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="id" value="<?= $fiberplanpipes->id ?>"/>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="description">Bezeichnung * / Gis
|
||||
Id</label>
|
||||
<div class="col-lg-2">
|
||||
<input required="required" type="text" id="description" name="description"
|
||||
class="form-control"
|
||||
value="<?= $fiberplanpipes->description ?>"/>
|
||||
</div>
|
||||
<div class="col-lg-1">
|
||||
<input type="text" id="gisid" name="gisid" placeholder="Gis Id"
|
||||
class="form-control"
|
||||
value="<?= $fiberplanpipes->gisid ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="type">Type *</label>
|
||||
<div class="col-lg-3">
|
||||
<select required="required" id="type" name="type" class="select2 form-control">
|
||||
<option value=""></option>
|
||||
<option value="1" <?= ($fiberplanpipes->type == "1") ? "selected='selected'" : "" ?>>
|
||||
Einzel
|
||||
</option>
|
||||
<option value="2" <?= ($fiberplanpipes->type == "2") ? "selected='selected'" : "" ?>>
|
||||
Schutzrohr
|
||||
</option>
|
||||
<option value="3" <?= ($fiberplanpipes->type == "3") ? "selected='selected'" : "" ?>>
|
||||
Verband
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="dimesion-div"
|
||||
style="<?= ($fiberplanpipes->type == "3") ? "display:none" : "" ?>">
|
||||
<label class="col-lg-2 col-form-label" for="type_description">Dimension *</label>
|
||||
<div class="col-lg-3">
|
||||
<select required="required" <?= ($fiberplanpipes->type == "3") ? 'disabled="disabled"' : "" ?>
|
||||
id="type_description" name="type_description"
|
||||
class="select2 form-control">
|
||||
<option value=""></option>
|
||||
<option value="1" <?= ($fiberplanpipes->type_description == "1") ? "selected='selected'" : "" ?>>
|
||||
MR7
|
||||
</option>
|
||||
<option value="2" <?= ($fiberplanpipes->type_description == "2") ? "selected='selected'" : "" ?>>
|
||||
MR14
|
||||
</option>
|
||||
<option value="3" <?= ($fiberplanpipes->type_description == "3") ? "selected='selected'" : "" ?>>
|
||||
MR16
|
||||
</option>
|
||||
<option value="4" <?= ($fiberplanpipes->type_description == "4") ? "selected='selected'" : "" ?>>
|
||||
MR20
|
||||
</option>
|
||||
<option value="5" <?= ($fiberplanpipes->type_description == "5") ? "selected='selected'" : "" ?>>
|
||||
PE32
|
||||
</option>
|
||||
<option value="6" <?= ($fiberplanpipes->type_description == "6") ? "selected='selected'" : "" ?>>
|
||||
PE40
|
||||
</option>
|
||||
<option value="7" <?= ($fiberplanpipes->type_description == "7") ? "selected='selected'" : "" ?>>
|
||||
PE50
|
||||
</option>
|
||||
<option value="8" <?= ($fiberplanpipes->type_description == "8") ? "selected='selected'" : "" ?>>
|
||||
KSR50
|
||||
</option>
|
||||
<option value="9" <?= ($fiberplanpipes->type_description == "9") ? "selected='selected'" : "" ?>>
|
||||
KSR80
|
||||
</option>
|
||||
<option value="10" <?= ($fiberplanpipes->type_description == "10") ? "selected='selected'" : "" ?>>
|
||||
KSR100
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" id="dimension-bundle-div"
|
||||
style="<?= ($fiberplanpipes->type < "3" || !$fiberplanpipes->type) ? "display:none" : "" ?>">
|
||||
<label class="col-lg-2 col-form-label" for="fiberplanpipetemplate_id">Multirohr
|
||||
*</label>
|
||||
<div class="col-lg-3">
|
||||
<select <?= ($fiberplanpipes->type < "3" || !$fiberplanpipes->type) ? 'disabled="disabled"' : "" ?>
|
||||
required="required" id="fiberplanpipetemplate_id"
|
||||
name="fiberplanpipetemplate_id"
|
||||
class="select2 form-control">
|
||||
<option value=""></option>
|
||||
<?php foreach ($fiberplanpipetemplates as $fiberplanpipetemplate) :
|
||||
$name = "";
|
||||
if ($fiberplanpipetemplate->pipe7x4 && $fiberplanpipetemplate->pipe14x10) {
|
||||
$name = $fiberplanpipetemplate->name . " " . $fiberplanpipetemplate->pipe7x4 . "*7x4" . "/" . $fiberplanpipetemplate->pipe14x10 . "*14x10";
|
||||
} else if ($fiberplanpipetemplate->pipe7x4) {
|
||||
$name = $fiberplanpipetemplate->name . " " . $fiberplanpipetemplate->pipe7x4 . "*7x4";
|
||||
} else if ($fiberplanpipetemplate->pipe14x10) {
|
||||
$name = $fiberplanpipetemplate->name . " " . $fiberplanpipetemplate->pipe14x10 . "*14x10";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<option <?= ($fiberplanpipetemplate->id == $fiberplanpipes->fiberPlanPipeTemplate_id) ? "selected='selected'" : "" ?>
|
||||
value="<?= $fiberplanpipetemplate->id ?>"><?= $name ?></option>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="length">Länge (m) *</label>
|
||||
<div class="col-lg-1">
|
||||
<input required="required" type="number" step="any" id="length" name="length"
|
||||
class="form-control"
|
||||
value="<?= $fiberplanpipes->length ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="endpoints">
|
||||
<?php if ($fiberplanpipeendpoints) :
|
||||
FiberPlanPipeModel::generateEndpoints($fiberplanpipeendpoints, $networks);
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="status">Status *</label>
|
||||
<div class="col-lg-2">
|
||||
<select id="status" name="status" class="select2 form-control"
|
||||
required="required">
|
||||
<option value=""></option>
|
||||
<option value="10" <?= ($fiberplanpipes->status == "10") ? "selected='selected'" : "" ?>>
|
||||
Geplant
|
||||
</option>
|
||||
<option value="20" <?= ($fiberplanpipes->status == "20") ? "selected='selected'" : "" ?>>
|
||||
Umsetzung
|
||||
</option>
|
||||
<option value="30" <?= ($fiberplanpipes->status == "30") ? "selected='selected'" : "" ?>>
|
||||
Fertiggestellt
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="responsible">Zuständig</label>
|
||||
<div class="col-lg-2">
|
||||
<select id="responsible" name="responsible" class="select2 form-control">
|
||||
<option value=""></option>
|
||||
<option value="1" <?= ($fiberplanpipes->responsible == "1") ? "selected='selected'" : "" ?>>
|
||||
Tiefbaufirma
|
||||
</option>
|
||||
<option value="2" <?= ($fiberplanpipes->responsible == "2") ? "selected='selected'" : "" ?>>
|
||||
Person
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="responsible-div" class="col-lg-3"
|
||||
style="<?= ($fiberplanpipes->responsible != "1") ? "display:none" : "" ?>">
|
||||
<select id="address_id" name="address_id"
|
||||
class="select2 form-control" <?= ($fiberplanpipes->responsible != "1") ? 'disabled="disabled"' : "" ?> >
|
||||
<option value=""></option>
|
||||
<?php foreach ($pipworkeraddresses as $pipworkeraddress): ?>
|
||||
<option value="<?= $pipworkeraddress->id ?>" <?= ($fiberplanpipes->address_id == $pipworkeraddress->id) ? "selected='selected'" : "" ?>><?= $pipworkeraddress->company ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div id="responsible_text-div" class="col-lg-3">
|
||||
<input id="responsible_text" name="responsible_text"
|
||||
value="<?= $fiberplanpipes->responsible_text ?>"
|
||||
placeholder="Ansprechsperson"
|
||||
class="form-control"/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="comment">Kommentar</label>
|
||||
<div class="col-lg-3">
|
||||
<textarea id="comment" name="comment"
|
||||
class="form-control"><?= $fiberplanpipes->comment ?></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>
|
||||
<a href="<?= $cancelUrl ?>">
|
||||
<button type="button" class="btn btn-secondary">Abbrechen</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function checkendpoints() {
|
||||
let endpointcounter = $('.endpoint-label').length;
|
||||
let endpointtext;
|
||||
$('.endpoint-label').each(function (index) {
|
||||
|
||||
|
||||
$(this).find('.move-endpoint-up').remove();
|
||||
if (index == 0) {
|
||||
endpointtext = "Startpunkt";
|
||||
$(this).find('.endpointsymbol').html('<i id="add-endpoint" class="fa-regular fa-circle-plus"></i>');
|
||||
} else if (endpointcounter == 2) {
|
||||
endpointtext = 'Standort ' + index;
|
||||
$(this).closest('.endpoint-maindiv').find('.label-text').after('<i title="nach oben verschieben" class="fa-sharp fa-solid fa-up move-endpoint-up"></i>');
|
||||
$(this).find('.endpointsymbol').html('');
|
||||
} else if (index > 0) {
|
||||
endpointtext = 'Standort ' + index;
|
||||
$(this).closest('.endpoint-maindiv').find('.label-text').after('<i title="nach oben verschieben" class="fa-sharp fa-solid fa-up move-endpoint-up"></i>');
|
||||
$(this).find('.endpointsymbol').html('<i class="fa-regular fa-circle-minus remove-endpoint"></i>');
|
||||
}
|
||||
|
||||
$(this).find('.label-text').text(endpointtext + ' *');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$("body").on("change", ".endpoint_type,.endpoint_network_id ", function () {
|
||||
|
||||
const splitid = $(this).attr('id').split('_');
|
||||
let thisid = splitid[0];
|
||||
var options;
|
||||
if ($.trim($("#" + thisid + "_endpoint_network_id").val()) != "" && $.trim($("#" + thisid + "_endpoint_type").val())) {
|
||||
|
||||
|
||||
$.getJSON("<?= self::getUrl("FiberPlanPipe", "api", ['do' => 'getBuildingInfo']) ?>&network_id=" + $.trim($("#" + thisid + "_endpoint_network_id").val()) + "&bdtype=" + $.trim($("#" + thisid + "_endpoint_type").val()), {})
|
||||
.done(function (data) {
|
||||
$.each(data, function (k, val) {
|
||||
options = options + '<option value="' + val.id + '">' + val.name + '</option>';
|
||||
});
|
||||
$("#" + thisid + "_mid-point-building").empty();
|
||||
$("#" + thisid + "_mid-point-building").append('<select id=' + thisid + '_endpoint" required="required" name="endpoint[]" class="select2 form-control">' + options + '</select>');
|
||||
$(".select2").select2({placeholder: ""});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("body").on("click", ".move-endpoint-up", function () {
|
||||
$(this).closest('.endpoint-maindiv').insertBefore($(this).closest('.endpoint-maindiv').prev());
|
||||
checkendpoints();
|
||||
});
|
||||
|
||||
$("body").on("click", ".remove-endpoint", function () {
|
||||
let endpointcounter;
|
||||
$(this).closest('.endpoint-maindiv').remove();
|
||||
checkendpoints();
|
||||
});
|
||||
|
||||
|
||||
$("body").on("change", "#startpoint_type,#network_id", function () {
|
||||
var options;
|
||||
if ($.trim($("#network_id").val()) != "" && $.trim($("#startpoint_type").val())) {
|
||||
|
||||
|
||||
$.getJSON("<?= self::getUrl("FiberPlanPipe", "api", ['do' => 'getBuildingInfo']) ?>&network_id=" + $.trim($("#network_id").val()) + "&bdtype=" + $.trim($("#startpoint_type").val()), {})
|
||||
.done(function (data) {
|
||||
$.each(data, function (k, val) {
|
||||
options = options + '<option value="' + val.id + '">' + val.name + '</option>';
|
||||
});
|
||||
$('#starting-point-building').empty();
|
||||
$('#starting-point-building').append('<select id="startpoint" required="required" name="startpoint" class="select2 form-control">' + options + '</select>');
|
||||
$(".select2").select2({placeholder: ""});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
$("body").on("change", "#entpoint_type,#network_id2", function () {
|
||||
var options;
|
||||
if ($.trim($("#network_id2").val()) != "" && $.trim($("#entpoint_type").val())) {
|
||||
|
||||
|
||||
$.getJSON("<?= self::getUrl("FiberPlanPipe", "api", ['do' => 'getBuildingInfo']) ?>&network_id=" + $.trim($("#network_id2").val()) + "&bdtype=" + $.trim($("#entpoint_type").val()), {})
|
||||
.done(function (data) {
|
||||
$.each(data, function (k, val) {
|
||||
options = options + '<option value="' + val.id + '">' + val.name + '</option>';
|
||||
});
|
||||
$('#end-point-building').empty();
|
||||
$('#end-point-building').append('<select id="endpoint" name="endpoint" required="required" class="select2 form-control">' + options + '</select><input type="hidden" name="endpointid[]" value="">');
|
||||
$(".select2").select2({placeholder: ""});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
$("body").on("change", "#type", function () {
|
||||
if ($(this).val() < 3) {
|
||||
$('#dimesion-div').show();
|
||||
$('#dimension-bundle-div').hide();
|
||||
$("#type_description").prop("disabled", false);
|
||||
$("#fiberplanpipetemplate_id").prop("disabled", true);
|
||||
$(".select2").select2({placeholder: ""});
|
||||
} else {
|
||||
$('#dimesion-div').hide();
|
||||
$('#dimension-bundle-div').show();
|
||||
$("#type_description").prop("disabled", true);
|
||||
$("#fiberplanpipetemplate_id").prop("disabled", false);
|
||||
$(".select2").select2({placeholder: ""});
|
||||
}
|
||||
});
|
||||
$("body").on("change", "#responsible", function () {
|
||||
if ($(this).val() == 1) {
|
||||
$('#responsible-div').show();
|
||||
$("#address_id").prop("disabled", false);
|
||||
$(".select2").select2({placeholder: ""});
|
||||
} else {
|
||||
$('#responsible-div').hide();
|
||||
$("#address_id").prop("disabled", true);
|
||||
$(".select2").select2({placeholder: ""});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// disable mousewheel on a input number field when in focus
|
||||
$('form').on('focus', 'input[type=number]', function (e) {
|
||||
$(this).on('wheel.disableScroll', function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
});
|
||||
$('form').on('blur', 'input[type=number]', function (e) {
|
||||
$(this).off('wheel.disableScroll')
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".select2").select2({placeholder: ""});
|
||||
if ($.trim($("#network_id").val()) != "" && $.trim($("#startpoint_type").val())) {
|
||||
|
||||
$.getJSON("<?= self::getUrl("FiberPlanPipe", "api", ['do' => 'getBuildingInfo']) ?>&network_id=" + $.trim($("#network_id").val()) + "&bdtype=" + $.trim($("#startpoint_type").val()), {})
|
||||
.done(function (data) {
|
||||
var options;
|
||||
$.each(data, function (k, val) {
|
||||
if ($('#startpoint_type').data('startpoint') == val.id) {
|
||||
options = options + '<option selected="selected" value="' + val.id + '">' + val.name + '</option>';
|
||||
} else {
|
||||
options = options + '<option value="' + val.id + '">' + val.name + '</option>';
|
||||
}
|
||||
});
|
||||
$('#starting-point-building').empty();
|
||||
$('#starting-point-building').append('<select id="startpoint" name="startpoint" required="required" class="select2 form-control">' + options + '</select>');
|
||||
$(".select2").select2({placeholder: ""});
|
||||
});
|
||||
}
|
||||
if ($.trim($("#network_id2").val()) != "" && $.trim($("#entpoint_type").val())) {
|
||||
|
||||
|
||||
$.getJSON("<?= self::getUrl("FiberPlanPipe", "api", ['do' => 'getBuildingInfo']) ?>&network_id=" + $.trim($("#network_id2").val()) + "&bdtype=" + $.trim($("#entpoint_type").val()), {})
|
||||
.done(function (data) {
|
||||
var options;
|
||||
$.each(data, function (k, val) {
|
||||
if ($('#entpoint_type').data('endpoint') == val.id) {
|
||||
options = options + '<option selected="selected" value="' + val.id + '">' + val.name + '</option>';
|
||||
} else {
|
||||
options = options + '<option value="' + val.id + '">' + val.name + '</option>';
|
||||
}
|
||||
});
|
||||
$('#end-point-building').empty();
|
||||
$('#end-point-building').append('<select id="endpoint" name="endpoint" required="required" class="select2 form-control">' + options + '</select>');
|
||||
$(".select2").select2({placeholder: ""});
|
||||
});
|
||||
|
||||
}
|
||||
$("body").on("click", "#add-endpoint", function (event) {
|
||||
let randid = Math.floor(Math.random() * 10000);
|
||||
let endpointtype = $('#startpoint_type').html();
|
||||
let endpointcounter = $('.endpoint-maindiv').length + 1;
|
||||
let endpointuparrow = "";
|
||||
let standorttext = "";
|
||||
if (endpointcounter > 1) {
|
||||
endpointuparrow = '<i title="nach oben verschieben" class="fa-sharp fa-solid fa-up move-endpoint-up"></i>';
|
||||
}
|
||||
|
||||
if (endpointcounter <= 7) {
|
||||
$('#endpoints').append(`<div class="form-group row endpoint-maindiv">
|
||||
<label class="col-lg-2 col-form-label endpoint-label" for="` + randid + `_endpoint_network_id"><span class="label-text">Standort ` + $('.endpoint-maindiv').length + ` * </span>` + endpointuparrow + `<span class="endpointsymbol"><i class="fa-regular fa-circle-minus remove-endpoint"></i></span></label>
|
||||
<div class="col-lg-2"><select id="` + randid + `_endpoint_network_id" required="required" name="endpoint_network_id[]"
|
||||
class="select2 form-control endpoint_network_id">` + $('#network_id').html() + `</select></div>
|
||||
<div class="col-lg-2 ">
|
||||
<select id="` + randid + `_endpoint_type" name="endpoint_type[]" required="required"
|
||||
class="select2 form-control endpoint_type" data-startpoint="" : "" >
|
||||
<option value=""></option>
|
||||
<option value="4">
|
||||
Schacht-Verteiler
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2" id="` + randid + `_mid-point-building">
|
||||
|
||||
</div>
|
||||
</div>`);
|
||||
$('#' + randid + '_endpoint_network_id').val($('#network_id').val());
|
||||
checkendpoints();
|
||||
$(".select2").select2({placeholder: ""});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -0,0 +1,259 @@
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$typeOption[1] = "Einzel";
|
||||
$typeOption[2] = "Schutzrohr";
|
||||
$typeOption[3] = "Verband";
|
||||
$dimension_v1Option[1] = "MR7";
|
||||
$dimension_v1Option[2] = "MR14";
|
||||
$dimension_v1Option[3] = "MR16";
|
||||
$dimension_v1Option[4] = "MR20";
|
||||
$dimension_v1Option[5] = "PE32";
|
||||
$dimension_v1Option[6] = "PE40";
|
||||
$dimension_v1Option[7] = "PE50";
|
||||
$dimension_v1Option[8] = "KSR50";
|
||||
$dimension_v1Option[9] = "KSR80";
|
||||
$dimension_v1Option[10] = "KSR100";
|
||||
$dimension_v2Option[1] = "Anzahl";
|
||||
$dimension_v2Option[2] = "Dimenson";
|
||||
$dimension_v2Option[3] = "Farben";
|
||||
$starting_pointOption[1] = "Greenfield";
|
||||
$starting_pointOption[2] = "POP";
|
||||
$starting_pointOption[3] = "Building";
|
||||
$starting_pointOption[4] = "Schacht-Verteiler";
|
||||
$statusOption[10] = "Geplant";
|
||||
$statusOption[20] = "Umsetzung";
|
||||
$statusOption[30] = "Fertiggestellt";
|
||||
$responsibleOption[1] = "(F)";
|
||||
$responsibleOption[2] = "(P)";
|
||||
|
||||
foreach ($networks as $network) {
|
||||
$Network[$network->id] = $network->name;
|
||||
}
|
||||
foreach ($pipworkeraddresses as $pipworkeraddress) {
|
||||
$Pipeworker[$pipworkeraddress->id] = $pipworkeraddress->company;
|
||||
}
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- start page title -->
|
||||
<style>
|
||||
#map {
|
||||
height: 600px;
|
||||
width: 100%
|
||||
}
|
||||
</style>
|
||||
<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">Rohrverzeichnisse</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Rohrverzeichnisse</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Rohrverzeichnisse</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?= self::getUrl("FiberPlanPipe", "add") ?>"><i
|
||||
class="fas fa-plus"></i> Neuen Rohrverzeichnis anlegen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="datatable" class="table table-striped table-hover table-sm font-13">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="text-center">Bezeichnung</th>
|
||||
<th class="text-center">Type/Bezeichnung</th>
|
||||
|
||||
<th class="text-center">Länge (m)</th>
|
||||
<th>Netzgebiet(e)</th>
|
||||
<th class="text-center">Anfangspunkt</th>
|
||||
<th class="text-center">Endpunkt</th>
|
||||
<th class="text-center">Zuständig</th>
|
||||
<th class="text-center">Status</th>
|
||||
<th class="edit-width"></th>
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
|
||||
<th></th>
|
||||
<th></th>
|
||||
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($fiberplanpipes as $fiberplanpipe):
|
||||
|
||||
|
||||
if ($fiberplanpipe->type == "3") {
|
||||
$name = "";
|
||||
if ($fiberplanpipe->fiberPlanPipeTemplate->pipe7x4 && $fiberplanpipe->fiberPlanPipeTemplate->pipe14x10) {
|
||||
$name = $fiberplanpipe->fiberPlanPipeTemplate->fiberPlanPipeManufacturer->name . " " . $fiberplanpipe->fiberPlanPipeTemplate->pipe7x4 . "*7x4" . "/" . $fiberplanpipe->fiberPlanPipeTemplate->pipe14x10 . "*14x10";
|
||||
} else if ($fiberplanpipe->fiberPlanPipeTemplate->pipe7x4) {
|
||||
$name = $fiberplanpipe->fiberPlanPipeTemplate->fiberPlanPipeManufacturer->name . " " . $fiberplanpipe->fiberPlanPipeTemplate->pipe7x4 . "*7x4";
|
||||
} else if ($fiberplanpipe->fiberPlanPipeTemplate->pipe14x10) {
|
||||
$name = $fiberplanpipe->fiberPlanPipeTemplate->fiberPlanPipeManufacturer->name . " " . $fiberplanpipe->fiberPlanPipeTemplate->pipe14x10 . "*14x10";
|
||||
}
|
||||
$typeDescription = $name;
|
||||
//
|
||||
} else {
|
||||
$typeDescription = $dimension_v1Option[$fiberplanpipe->type_description];
|
||||
}
|
||||
$startpoint = '<span class="startpoint" data-toggle="modal" data-target="#pipemap" data-gpslat="' . $buildings[$fiberplanpipe->startpoint_type][$fiberplanpipe->startpoint]['gps_lat'] . '" data-gpslong="' . $buildings[$fiberplanpipe->startpoint_type][$fiberplanpipe->startpoint]['gps_long'] . '">' . $starting_pointOption[$fiberplanpipe->startpoint_type] . "/" . $buildings[$fiberplanpipe->startpoint_type][$fiberplanpipe->startpoint]['name'] . '</span>';
|
||||
$endpoint = '<span class="endpoint" data-toggle="modal" data-target="#pipemap" data-gpslat="' . $buildings[$fiberplanpipe->entpoint_type][$fiberplanpipe->endpoint]['gps_lat'] . '" data-gpslong="' . $buildings[$fiberplanpipe->entpoint_type][$fiberplanpipe->endpoint]['gps_long'] . '">' . $starting_pointOption[$fiberplanpipe->entpoint_type] . "/" . $buildings[$fiberplanpipe->entpoint_type][$fiberplanpipe->endpoint]['name'] . '</span>';
|
||||
|
||||
$responsible = $responsibleOption[$fiberplanpipe->responsible];
|
||||
|
||||
if ($fiberplanpipe->address_id) {
|
||||
$responsible .= " " . $Pipeworker[$fiberplanpipe->address_id];
|
||||
if ($fiberplanpipe->responsible_text) {
|
||||
$responsible .= " (" . $fiberplanpipe->responsible_text . ")";
|
||||
}
|
||||
} else {
|
||||
$responsible .= " " . $fiberplanpipe->responsible_text;
|
||||
}
|
||||
if ($fiberplanpipe->startpoint_network_id == $fiberplanpipe->endpoint_network_id) {
|
||||
$networkName = $Network[$fiberplanpipe->startpoint_network_id];
|
||||
} else {
|
||||
$networkName = $Network[$fiberplanpipe->startpoint_network_id] . " / " . $Network[$fiberplanpipe->endpoint_network_id];
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="<?= self::getUrl("FiberPlanPipe", "Detail", ["id" => $fiberplanpipe->id]) ?>"><?= $fiberplanpipe->description ?></a></td>
|
||||
<td style="white-space: nowrap"><?= $typeOption[$fiberplanpipe->type] . " / " . $typeDescription ?></td>
|
||||
<td class="text-center"><?= $fiberplanpipe->length ?></td>
|
||||
|
||||
<td><?= $networkName ?></td>
|
||||
<td><?= $startpoint ?></td>
|
||||
<td><?= $endpoint ?></td>
|
||||
<td><?= $responsible ?></td>
|
||||
<td><?= $statusOption[$fiberplanpipe->status] ?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?= self::getUrl("FiberPlanPipe", "edit", ["id" => $fiberplanpipe->id]) ?>"><i
|
||||
class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?= self::getUrl("FiberPlanPipe", "delete", ["id" => $fiberplanpipe->id]) ?>"
|
||||
onclick="if(!confirm('Rohrverzeichnis wirklich löschen?')) return false;"
|
||||
class="text-danger"
|
||||
title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#pipemap">
|
||||
Launch demo modal
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal fade" id="pipemap" tabindex="-1" role="dialog" aria-labelledby="pipemap"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="pipemapLabel">Rohrverzeichnis</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var startlat;
|
||||
var startlong;
|
||||
var endlat;
|
||||
var endlong;
|
||||
var startmarkertext;
|
||||
var endmarkertext;
|
||||
var marker;
|
||||
var polylinec;
|
||||
var polyline;
|
||||
var map = L.map('map').setView([51.505, -0.09], 13);
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19
|
||||
}).addTo(map);
|
||||
L.MakiMarkers.accessToken = '<?=TT_MAPBOX_TILE_API_TOKEN?>';
|
||||
var hidesearch = [2, 8];
|
||||
var columnfilter = [7];
|
||||
var columnoptions = '<option class="text-left" value="">Alle</option><option class="text-left" value="Geplant">Geplant</option><option class="text-left" value="Umsetzung">Umsetzung</option><option class="text-left" value="Fertiggestellt">Fertiggestellt</option>';
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
$('#pipemap').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
map.remove();
|
||||
map = L.map('map').setView([51.505, -0.09], 13);
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19
|
||||
}).addTo(map);
|
||||
startlat = button.closest('tr').find('.startpoint').data('gpslat');
|
||||
startlong = button.closest('tr').find('.startpoint').data('gpslong');
|
||||
endlat = button.closest('tr').find('.endpoint').data('gpslat');
|
||||
endlong = button.closest('tr').find('.endpoint').data('gpslong');
|
||||
startmarkertext = button.closest('tr').find('.startpoint').text();
|
||||
endmarkertext = button.closest('tr').find('.endpoint').text();
|
||||
|
||||
var icon_name = "town";
|
||||
var icon_color = "#ec98a2";
|
||||
var icon = L.MakiMarkers.icon({icon: icon_name, color: icon_color, size: "l"});
|
||||
marker = L.marker([startlat, startlong]).addTo(map);
|
||||
marker.bindPopup("" + startmarkertext);
|
||||
map.setView([button.data('gpslat'), button.data('gpslong')], 13)
|
||||
marker = L.marker([endlat, endlong]).addTo(map);
|
||||
// marker = L.marker([endlat, endlong], {icon: icon}).addTo(map);
|
||||
marker.bindPopup("" + endmarkertext);
|
||||
|
||||
polylinec = [
|
||||
[startlat, startlong],
|
||||
[endlat, endlong]
|
||||
];
|
||||
polyline = L.polyline(polylinec, {color: 'red'}).addTo(map);
|
||||
|
||||
|
||||
});
|
||||
$('#pipemap').on('shown.bs.modal', function (event) {
|
||||
map.invalidateSize();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -98,9 +98,9 @@
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","lineworker"]) && $me->can("Linework")): ?><li><a href="<?=self::getUrl("Linework")?>"><i class="fas fa-fw fa-ethernet text-info"></i> Leitungsbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","netoperator","lineworker"]) && $me->can("Patching")): ?><li class="has-sub-submenu"><a href="<?=self::getUrl("Patching")?>"><i class="fas fa-fw fa-plug text-info"></i> Patchungen</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","lineplanner","pipeworker","netoperator","lineworker"]) && $me->can("Filestore")): ?><li><a href="<?=self::getUrl("Filestore")?>"><i class="fas fa-fw fa-file text-info"></i> Dateiablage</a></li><?php endif; ?>
|
||||
<!-- //Vorbereitend für Faserplanung --><?php //if($me->is(["Admin","netowner","pipeplanner","pipeplanner"]) && $me->is("employee")): ?><!--<li><a href="--><?php //=self::getUrl("FiberPlanDispatcher")?><!--"><i class="fas fa-building-circle-arrow-right text-info"></i> Verteiler und Schächte</a></li>--><?php //endif; ?>
|
||||
<!-- //Vorbereitend für Faserplanung --><?php //if($me->is(["Admin","netowner","lineplanner","lineworker"]) && $me->is("employee")): ?><!--<li><a href="--><?php //=self::getUrl("FiberPlanPipe")?><!--"><i class="fas fa-pipe text-info pl-1"></i> Rohrverzeichnis</a></li>--><?php //endif; ?>
|
||||
<!-- //Vorbereitend für Faserplanung --><?php //if($me->is(["Admin","netowner","lineplanner","lineworker"]) && $me->is("employee")): ?><!--<li><a href="--><?php //=self::getUrl("FiberPlanCable")?><!--"><i class="fas fa-pipe text-info pl-1"></i> Kabelverzeichnis</a></li>--><?php //endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","pipeplanner"]) && $me->is("employee")): ?><li><a href="<?=self::getUrl("FiberPlanDispatcher")?>"><i class="fas fa-building-circle-arrow-right text-info"></i> Verteiler und Schächte</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","lineworker"]) && $me->is("employee")): ?><li><a href="<?=self::getUrl("FiberPlanPipe")?>"><i class="fas fa-pipe text-info pl-1"></i> Rohrverzeichnis</a></li><?php endif; ?>
|
||||
<!-- --><?php //if($me->is(["Admin","netowner","lineplanner","lineworker"]) && $me->is("employee")): ?><!--<li><a href="--><?php //=self::getUrl("FiberPlanCable")?><!--"><i class="fas fa-pipe text-info pl-1"></i> Kabelverzeichnis</a></li>--><?php //endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user