Lauout tweaks for Pipe- and Linework

This commit is contained in:
Frank Schubert
2025-04-15 18:52:32 +02:00
parent e2351d1f3d
commit b90f4a2454
12 changed files with 69 additions and 15 deletions

View File

@@ -358,13 +358,13 @@
<?php $i = 0; foreach($term->workflowitems as $item): ?>
<?php if($i==0): ?>
<?php if($item->type == "delimiter"): ?>
<tr class="workflow-header"><th colspan='<?=$wfColspan?>'><?=$item->label?></th></tr><tr>
<tr class="workflow-header"><th colspan='<?=$wfColspan?>'><h4 <?=($item->style) ? "style='".$item->style."'" : ""?>><?=$item->label?></h4></th></tr><tr>
<?php else: ?>
<tr>
<?php endif; ?>
<?php else: ?>
<?php if($item->type == "delimiter"): ?>
</tr><tr class="workflow-header"><th colspan='<?=$wfColspan?>'><?=$item->label?></th></tr><tr>
<tr class="workflow-header"><th colspan='<?=$wfColspan?>'><h4 <?=($item->style) ? "style='".$item->style."'" : ""?>><?=$item->label?></h4></th></tr><tr>
<?php else: ?>
<?php include(realpath(dirname(__FILE__)."/../")."/Workflow/form.php"); ?>
<?php if(!$me->is("Admin") && $item->required == 1 && $term->workflowitems['customer_passive_finished']->value->id && $term->workflowitems['customer_passive_finished']->value->value_int == 1): ?>

View File

@@ -183,13 +183,13 @@
<?php $i = 0; foreach($building->workflowitems as $item): ?>
<?php if($i==0): ?>
<?php if($item->type == "delimiter"): ?>
<tr class="workflow-header"><th colspan='<?=$wfColspan?>'><?=$item->label?></th></tr><tr>
<tr class="workflow-header"><th colspan='<?=$wfColspan?>'><h4 <?=($item->style) ? "style='".$item->style."'" : ""?>><?=$item->label?></h4></th></tr><tr>
<?php else: ?>
<tr>
<?php endif; ?>
<?php else: ?>
<?php if($item->type == "delimiter"): ?>
</tr><tr class="workflow-header"><th colspan='<?=$wfColspan?>'><?=$item->label?></th></tr><tr>
</tr><tr class="workflow-header"><th colspan='<?=$wfColspan?>'><h4 <?=($item->style) ? "style='".$item->style."'" : ""?>><?=$item->label?></h4></th></tr><tr>
<?php else: ?>
<?php include(realpath(dirname(__FILE__)."/../")."/Workflow/form.php"); ?>
<?php endif; ?>

View File

@@ -60,8 +60,9 @@
<small
class="text-info text-mono"
<?php if($item->value->changed): ?>
title="Geändert: <?=date("d.m.Y H:i",$item->value->changed)?> von <?=$item->value->changer->name?> (<?=isset($item->value->changer->address) ? $item->value->changer->address->getCompanyOrName(true) : "Unbekannt"?>)" ?>
title="Geändert: <?=date("d.m.Y H:i",$item->value->changed)?> von <?=$item->value->changer->name?> (<?=isset($item->value->changer->address) ? $item->value->changer->address->getCompanyOrName(true) : "Unbekannt"?>)"
<?php endif; ?>
>
<?php if($item->value->changed): ?>
<?=$item->value->changer->getAbbrName()?>
<?php endif; ?>

View File

@@ -5,6 +5,7 @@
name="wfitemplaceholder_<?=$item->name?>"
id="wfitemplaceholder_<?=$item->name?>_<?=$$wftype->id?>"
value="1"
<?=($item->style) ? $item->style : ""?>
<?=($item->value->value_int == 1) ? "checked='checked'" : ""?>
onchange="$('#wfitem_<?=$item->name?>_<?=$$wftype->id?>').val((this.checked) ? 1 : 0)"
>

View File

@@ -1,4 +1,12 @@
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>" placeholder="<?=$item->placeholder?>" />
<input
type="text"
class="form-control"
name="wfitem_<?=$item->name?>"
id="wfitem_<?=$item->name?>_<?=$$wftype->id?>"
value="<?=$item->value->value_string?>"
placeholder="<?=$item->placeholder?>"
<?=($item->style) ? "style='".$item->style."'" : ""?>
/>
<script type="text/javascript">
$('#wfitem_<?=$item->name?>_<?=$$wftype->id?>').datepicker({

View File

@@ -40,8 +40,8 @@ if(strpos($item->typedata, "=Model=") !== false) {
?>
<select class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>">
<option></option>
<select class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" <?=($item->style) ? "style='".$item->style."'" : ""?>>
<option <?=($item->style) ? "style='".$item->style."'" : ""?>></option>
<?php foreach($options as $opt): ?>
<?php
$key = $opt;
@@ -53,6 +53,9 @@ if(strpos($item->typedata, "=Model=") !== false) {
}
?>
<option value="<?=$key?>" <?=($key == $item->value->value_string) ? "selected='selected'" : ""?>><?=$label?></option>
<option
value="<?=$key?>"
<?=($key == $item->value->value_string) ? "selected='selected'" : ""?>
><?=$label?></option>
<?php endforeach; ?>
</select>

View File

@@ -1 +1 @@
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>">
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>" <?=($item->style) ? "style='".$item->style."'" : ""?>>

View File

@@ -10,11 +10,11 @@
<div class="row">
<div class="col-md-5 padding-right-2">
<label class="form-label" for="wfitem_<?=$item->name?>_lat_<?=$$wftype->id?>">GPS Breite <?=($item->required == 1) ? "*" : ""?></label>
<input type="text" class="form-control" name="wfitem_<?=$item->name?>[lat]" id="wfitem_<?=$item->name?>_lat_<?=$$wftype->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_<?=$$wftype->id?>" value="<?=$lat?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LAT)?>" <?=($item->style) ? "style='".$item->style."'" : ""?>>
</div>
<div class="col-md-5 padding-left-2">
<label class="form-label" for="wfitem_<?=$item->name?>_long_<?=$$wftype->id?>">GPS Länge <?=($item->required == 1) ? "*" : ""?></label>
<input type="text" class="form-control" name="wfitem_<?=$item->name?>[long]" id="wfitem_<?=$item->name?>_long_<?=$$wftype->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_<?=$$wftype->id?>" value="<?=$long?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LONG)?>" <?=($item->style) ? "style='".$item->style."'" : ""?>>
</div>
<div class="col-md-2 padding-left-2">
<label class="form-label">&nbsp;</label>

View File

@@ -1 +1 @@
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>">
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>" <?=($item->style) ? "style='".$item->style."'" : ""?>>

View File

@@ -1 +1,9 @@
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>" placeholder="<?=$item->placeholder?>">
<input
type="text"
class="form-control"
name="wfitem_<?=$item->name?>"
id="wfitem_<?=$item->name?>_<?=$$wftype->id?>"
value="<?=$item->value->value_string?>"
placeholder="<?=$item->placeholder?>"
<?=($item->style) ? "style='".$item->style."'" : ""?>
>

View File

@@ -1 +1 @@
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>">
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>" <?=($item->style) ? "style='".$item->style."'" : ""?>>

View File

@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class WorkflowitemAddStyle extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Workflowitem");
$table->addColumn("style", "string", ["limit" => 255, "default" => null, "null" => true, "after" => "placeholder"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Workflowitem");
$table->removeColumn("style");
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}