netowners can set gps coords in building

This commit is contained in:
Frank Schubert
2022-02-24 16:54:45 +01:00
parent d8d3d0d43e
commit 38efd60fd4
2 changed files with 29 additions and 13 deletions

View File

@@ -268,27 +268,40 @@
<th>Rohrfarbe</th>
</tr>
<tr>
<td><?=($term->building->getWorkflowvalue("ist_anschlusspunkt_typ")) ? $term->building->getWorkflowvalue("anschlusspunkt_typ") : $term->building->getWorkflowvalue("anschlusspunkt_typ")?></td>
<td><?=($term->building->getWorkflowvalue("ist_anschlusspunkt_typ")) ? $term->building->getWorkflowvalue("ist_anschlusspunkt_typ") : $term->building->getWorkflowvalue("anschlusspunkt_typ")?></td>
<td><?=($term->building->getWorkflowvalue('ist_anschlusspunkt_name')) ? $term->building->getWorkflowvalue('ist_anschlusspunkt_name') : $term->building->getWorkflowvalue('anschlusspunkt_name')?></td>
<td>
<?php if($term->building->getWorkflowvalue('ist_anschlusspunkt_gps')): ?>
<a href='https://maps.google.com/maps?t=k&q=loc:<?=join("+", $term->building->workflowitems['ist_anschlusspunkt_gps']->value->gps)?>' target='_blank'><i class='fas fa-external-link-alt'></i> <?=join(", ", $term->building->workflowitems['ist_anschlusspunkt_gps']->value->gps)?></a></td>
<?php else: ?>
<?php elseif($term->building->getWorkflowvalue('anschlusspunkt_gps')): ?>
<a href='https://maps.google.com/maps?t=k&q=loc:<?=join("+", $term->building->workflowitems['anschlusspunkt_gps']->value->gps)?>' target='_blank'><i class='fas fa-external-link-alt'></i> <?=join(", ", $term->building->workflowitems['anschlusspunkt_gps']->value->gps)?></a></td>
<?php endif; ?>
<td><?=($term->building->getWorkflowvalue('ist_rohrverband_name')) ? $term->building->getWorkflowvalue('ist_rohrverband_name') : $term->building->getWorkflowvalue('rohrverband_name')?></td>
<td><?=($term->building->getWorkflowvalue('ist_rohrtype')) ? $term->building->getWorkflowvalue('ist_rohrtype') : $term->building->getWorkflowvalue('rohrtype')?></td>
<td>
<span
style="
background-color: #<?=TT_CABLE_COLORS[$term->building->getWorkflowvalue('rohrfarbe')]["hex"]?>;
<?php if(TT_CABLE_COLORS[$term->building->getWorkflowvalue('rohrfarbe')]["mark"]): ?>
color: #<?=TT_CABLE_COLORS[$term->building->getWorkflowvalue('rohrfarbe')]["hexfg"]?>;
<?php else: ?>
color: #<?=TT_CABLE_COLORS[$term->building->getWorkflowvalue('rohrfarbe')]["hex"]?>;
<?php endif; ?>
border-radius: 3px;
">-------</span> <?=ucfirst($term->building->getWorkflowvalue('rohrfarbe'))?>
<?php if($term->building->getWorkflowvalue('ist_rohrfarbe')): ?>
<span
style="
background-color: #<?=TT_CABLE_COLORS[$term->building->getWorkflowvalue('ist_rohrfarbe')]["hex"]?>;
<?php if(TT_CABLE_COLORS[$term->building->getWorkflowvalue('ist_rohrfarbe')]["mark"]): ?>
color: #<?=TT_CABLE_COLORS[$term->building->getWorkflowvalue('ist_rohrfarbe')]["hexfg"]?>;
<?php else: ?>
color: #<?=TT_CABLE_COLORS[$term->building->getWorkflowvalue('ist_rohrfarbe')]["hex"]?>;
<?php endif; ?>
border-radius: 3px;
">-------</span> <?=ucfirst($term->building->getWorkflowvalue('ist_rohrfarbe'))?>
<?php elseif($term->building->getWorkflowvalue('rohrfarbe')): ?>
<span
style="
background-color: #<?=TT_CABLE_COLORS[$term->building->getWorkflowvalue('rohrfarbe')]["hex"]?>;
<?php if(TT_CABLE_COLORS[$term->building->getWorkflowvalue('rohrfarbe')]["mark"]): ?>
color: #<?=TT_CABLE_COLORS[$term->building->getWorkflowvalue('rohrfarbe')]["hexfg"]?>;
<?php else: ?>
color: #<?=TT_CABLE_COLORS[$term->building->getWorkflowvalue('rohrfarbe')]["hex"]?>;
<?php endif; ?>
border-radius: 3px;
">-------</span> <?=ucfirst($term->building->getWorkflowvalue('rohrfarbe'))?>
<?php endif; ?>
</td>
</tr>
</table>

View File

@@ -215,9 +215,12 @@ class BuildingController extends mfBaseController {
$data['edit_by'] = 1;
if($this->me->is("Admin")) {
if($this->me->is(["Admin", "netowner"])) {
if($r->gps_lat) $data['gps_lat'] = trim($r->gps_lat);
if($r->gps_long) $data['gps_long'] = trim($r->gps_long);
}
if($this->me->is("Admin")) {
if($r->code) $data['code'] = trim($r->code);
if($r->laea) $data['laea'] = trim($r->laea);
}