219 lines
12 KiB
PHP
219 lines
12 KiB
PHP
<?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):
|
|
unset($networks);
|
|
unset($endpoints);
|
|
foreach ($fiberplanpipeEndpoints[$fiberplanpipe->id] as $fiberplanpipeEndpoint) {
|
|
if ($fiberplanpipeEndpoint->pop_id) {
|
|
$networks[$fiberplanpipeEndpoint->pop->network->name] = $fiberplanpipeEndpoint->pop->network->name;
|
|
$endpoints[] = '<span title="POP">(P) </span>' . $fiberplanpipeEndpoint->pop->name;
|
|
} else if ($fiberplanpipeEndpoint->building_id) {
|
|
$networks[$fiberplanpipeEndpoint->building->network->name] = $fiberplanpipeEndpoint->building->network->name;
|
|
$endpoints[] = '<span title="Building">(B) </span>' . $fiberplanpipeEndpoint->building->street . " " . $fiberplanpipeEndpoint->building->number;
|
|
} else if ($fiberplanpipeEndpoint->fiberPlanDispatcher_id) {
|
|
$networks[$fiberplanpipeEndpoint->fiberPlanDispatcher->network->name] = $fiberplanpipeEndpoint->fiberPlanDispatcher->network->name;
|
|
if ($fiberplanpipeEndpoint->fiberPlanDispatcher->object_type == "1") {
|
|
$endpoints[] = '<span title="Verteiler">(V) </span>' . $fiberplanpipeEndpoint->fiberPlanDispatcher->description;
|
|
} elseif ($fiberplanpipeEndpoint->fiberPlanDispatcher->object_type == "2") {
|
|
$endpoints[] = '<span title="Schacht">(S) </span>' . $fiberplanpipeEndpoint->fiberPlanDispatcher->description;
|
|
} else if ($fiberplanpipeEndpoint->fiberPlanDispatcher->object_type == "3") {
|
|
$endpoints[] = '<span title="Greenfield">(G) </span>' . $fiberplanpipeEndpoint->fiberPlanDispatcher->description;
|
|
} else if ($fiberplanpipeEndpoint->fiberPlanDispatcher->object_type == "4") {
|
|
$endpoints[] = '<span title="Abzweigepunkt">(A) </span>' . $fiberplanpipeEndpoint->fiberPlanDispatcher->description;
|
|
}
|
|
}
|
|
}
|
|
|
|
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><?= implode(',', $networks) ?></td>
|
|
<td><?= $endpoints[0] ?></td>
|
|
<td><?= $endpoints[count($endpoints) - 1] ?></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>
|
|
</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"></script>
|
|
|
|
<script type="text/javascript"
|
|
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
|
|
|
|
|
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|