Made different Layouts more customizable
This commit is contained in:
72
Layout/andom_old/Workflow/form.php
Normal file
72
Layout/andom_old/Workflow/form.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
$wfLabelClass = "";
|
||||
$m = [];
|
||||
if(preg_match('/<!--class:\s*([^>]+)-->/',$item->label, $m)) {
|
||||
if($m[1]) {
|
||||
$wfLabelClass = $m[1];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<td id="workflow-item-<?=$item->name?>-<?=$$wftype->id?>" class="workflow-item wfitem-<?=$item->type?> wfitem-width-<?=$item->width?>" <?=($item->width > 1) ? "colspan='".$item->width."'" : ""?> style="width: <?=$this->commaToDot(round(100 / $wfColspan, 2) * $item->width)?>%">
|
||||
<div class="wf-content">
|
||||
<?php if($item->type != "gps"): ?>
|
||||
<label class="form-label <?=$wfLabelClass?>" for="wfitem_<?=$item->name?>_<?=$$wftype->id?>">
|
||||
<?=($item->label) ? $item->label : " "?>
|
||||
<?=($item->label && $item->required == 1) ? "*" : ""?>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
||||
switch($item->type) {
|
||||
case "string":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/string.php");
|
||||
break;
|
||||
case "int":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/int.php");
|
||||
break;
|
||||
case "bool":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/bool.php");
|
||||
break;
|
||||
case "enum":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/enum.php");
|
||||
break;
|
||||
case "text":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/text.php");
|
||||
break;
|
||||
case "file":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/file.php");
|
||||
break;
|
||||
case "gps":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/gps.php");
|
||||
break;
|
||||
case "color":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/color.php");
|
||||
break;
|
||||
case "delimiter":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/delimiter.php");
|
||||
break;
|
||||
case "date":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/date.php");
|
||||
break;
|
||||
case "empty":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/empty.php");
|
||||
break;
|
||||
default:
|
||||
include(realpath(dirname(__FILE__)."/items/")."/string.php");
|
||||
}
|
||||
?>
|
||||
<div style="overflow-x: hidden">
|
||||
<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?> (<?=$item->value->changer->address->getCompanyOrName(true)?>)"
|
||||
<?php endif; ?>
|
||||
>
|
||||
<?php if($item->value->changed): ?>
|
||||
<?=$item->value->changer->getAbbrName()?>
|
||||
<?php endif; ?>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
Reference in New Issue
Block a user