WIP Pipework Workflow

This commit is contained in:
Frank Schubert
2021-08-29 16:56:46 +02:00
parent 0f42b2b942
commit b81081cfe6
22 changed files with 584 additions and 111 deletions

View File

@@ -1,25 +1,23 @@
<?php
$lat = "";
$long = "";
if($item->value_string) {
$gps_parts = explode(";", $item->value_string);
if($item->value->value_string) {
$gps_parts = explode(";", $item->value->value_string);
$lat = $gps_parts[0];
$long = $gps_parts[1];
}
?>
<div class="row">
<div class="col-md-6 padding-right-2">
<div class="col-md-5 padding-right-2">
<label class="form-label" for="wfitem_<?=$item->name?>_lat_<?=$building->id?>">GPS Breite <?=($item->required == 1) ? "*" : ""?></label>
<input type="text" class="form-control" name="wfitem_<?=$item->name?>_lat_<?=$building->id?>" id="wfitem_<?=$item->name?>_lat_<?=$building->id?>" value="<?=$lat?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LAT)?>">
<input type="text" class="form-control" name="wfitem_<?=$item->name?>[lat]" id="wfitem_<?=$item->name?>_lat_<?=$building->id?>" value="<?=$lat?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LAT)?>">
</div>
<div class="col-md-6 padding-left-2">
<div class="col-md-5 padding-left-2">
<label class="form-label" for="wfitem_<?=$item->name?>_long_<?=$building->id?>">GPS Länge <?=($item->required == 1) ? "*" : ""?></label>
<input type="text" class="form-control" name="wfitem_<?=$item->name?>_long_<?=$building->id?>" id="wfitem_<?=$item->name?>_long_<?=$building->id?>" value="<?=$long?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LONG)?>">
<input type="text" class="form-control" name="wfitem_<?=$item->name?>[long]" id="wfitem_<?=$item->name?>_long_<?=$building->id?>" value="<?=$long?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LONG)?>">
</div>
<div class="col-md-2 padding-left-2">
<label class="form-label">&nbsp;</label>
<div><?php if($lat && $long): ?><a href="https://www.google.com/maps/search/?api=1&query=<?=$lat?>,<?=$long?>" target="_blank">Maps</a><?php endif; ?></div>
</div>
</div>
<?php if($lat && $long): ?>
<a href="https://www.google.com/maps/search/?api=1&query=<?=$lat?>,<?=$long?>" target="_blank"><i class="fas fa-external-link-alt"></i> Auf Google Maps öffnen</a>
<?php endif; ?>