<div class="entity">
<h4><?php echo $firstKeyLeft;?></h4>
<div class="grid5">
<div class="bold"> nicht zugewiesen </div>
<select class="leftEntities grid5" kind="<?php echo $firstKeyLeft;?>" multiple="multiple" size="10">
<?php
if(isset ($optionValuesLeft))
{
foreach ($optionValuesLeft as $optionIdLeft => $valueLeft)
{
// Daten unter der id zu einem String zusammenfügen, damit sie später in einer Linie stehen
$optionDisplayedLeft = '';
$tooltipDisplayedLeft = '';
// Counter, damit nur die nur die erste Spalte in der Mehrfachliste angezeigt werden und die restlichen nur bei den Tooltips
$counter = 0;
foreach ($valueLeft as $valueDisplayedLeft)
{
// falls Spalte leer keine Angabe hinschreiben
if($valueDisplayedLeft == "")
{
if ($counter === 0)
{
$optionDisplayedLeft = "keine Angabe";
$tooltipDisplayedLeft = "keine Angabe";
}
else
{
$tooltipDisplayedLeft .= " | keine Angabe";
}
}
// Ansonsten erste Spalte als option und der Rest als Tooltips
else
{
if ($counter === 0)
{
$optionDisplayedLeft = $valueDisplayedLeft;
$tooltipDisplayedLeft = $valueDisplayedLeft;
}
else
{
$tooltipDisplayedLeft .= " | " . $valueDisplayedLeft;
}
}
$counter++;
}
?>
<option value="<?php echo $optionIdLeft ?>" title="<?php echo $tooltipDisplayedLeft?>">
<?php
echo $optionDisplayedLeft;
?>
</option>
<?php
}
}
?>
</select>
</div>
<div class="grid2">
<div class="btn-group-vertical marginBottom10px">
<button kind="<?php echo $firstKeyLeft;?>" class="swapLeft btn btn-default btn-xs" title="hinzufügen">
<span class="glyphicon glyphicon-chevron-right"></span>
</button>
<button kind="<?php echo $firstKeyLeft;?>" class="swapLeftAll btn btn-default btn-xs" title="alle hinzufügen">
<span class="glyphicon glyphicon-forward"></span>
</button>
</div>
<div class="btn-group-vertical">
<button kind="<?php echo $firstKeyLeft;?>" class="swapRight btn btn-default btn-xs" title="entfernen">
<span class="glyphicon glyphicon-chevron-left"></span>
</button>
<button kind="<?php echo $firstKeyLeft;?>" class="swapRightAll btn btn-default btn-xs" title="alle entfernen">
<span class="glyphicon glyphicon-backward"></span>
</button>
</div>
</div>
<div class="grid5">
<div class="bold"> zugewiesen </div>
<select class="rightEntities grid5" kind="<?php echo $firstKeyLeft;?>" multiple="multiple" size="10">
<?php
if (isset($optionValuesRight))
{
foreach ($optionValuesRight as $optionIdRight => $valueRight)
{
// Daten unter der id zu einem String zusammenfügen, damit sie später in einer Linie stehen
$optionDisplayedRight = '';
$tooltipDisplayedRight = '';
$counter = 0;
foreach ($valueRight as $valueDisplayedRight)
{
// falls Spalte leer keine Angabe hinschreiben
if($valueDisplayedRight == "")
{
if ($counter === 0)
{
$optionDisplayedRight = "keine Angabe";
$tooltipDisplayedRight = "keine Angabe";
}
else
{
$tooltipDisplayedRight .= " | keine Angabe";
}
}
// Ansonsten erste Spalte als option und der Rest als Tooltips
else
{
if ($counter === 0)
{
$optionDisplayedRight = $valueDisplayedRight;
$tooltipDisplayedRight = $valueDisplayedRight;
}
else
{
$tooltipDisplayedRight .= " | " . $valueDisplayedRight;
}
}
$counter++;
}
?>
<option value="<?php echo $optionIdRight ?>" title="<?php echo $tooltipDisplayedRight?>">
<?php
echo $optionDisplayedRight;
?>
</option>
<?php
}
}
?>
</select>
</div>
<div class="entityFooter">
<div class="grid6 marginTop10px">
<input kind="<?php echo $firstKeyLeft;?>" class="entitySearch form-control-static" role="form" type="text" size="25"/>
<span class="glyphicon glyphicon-search"></span>
<label> Suchen </label>
</div>
<div class="grid6 marginTop10px text-right">
<button kind="<?php echo $firstKeyLeft;?>" listType="<?php echo $_GET['listType'];?> "entityID="<?php echo $id;?>" class="entitySave btn btn-default btn-xs">
<span class="glyphicon glyphicon-ok-sign"></span>
</button>
<label> Speichern </label>
<button kind="<?php echo $firstKeyLeft;?>" buttonId="<?php echo $buttonId;?>" listType="<?php echo $_GET['listType'];?>" class="entityDiscard btn btn-default btn-xs">
<span class="glyphicon glyphicon-minus-sign"></span>
</button>
<label> Verwerfen </label>
</div>
</div>
</div>