diff --git a/src/UI/Implementation/Component/Item/Renderer.php b/src/UI/Implementation/Component/Item/Renderer.php index 517ec6d83cf5..586365dfa2d5 100644 --- a/src/UI/Implementation/Component/Item/Renderer.php +++ b/src/UI/Implementation/Component/Item/Renderer.php @@ -188,8 +188,8 @@ protected function renderShy(Shy $component, RendererInterface $default_renderer $value = htmlentities($value); } $tpl->setCurrentBlock("property_row"); - $tpl->setVariable("PROP_NAME_A", $name); - $tpl->setVariable("PROP_VAL_A", $value); + $tpl->setVariable("PROP_NAME", $name); + $tpl->setVariable("PROP_VAL", $value); $tpl->parseCurrentBlock(); } $tpl->setCurrentBlock("properties"); @@ -338,19 +338,15 @@ protected function renderProperties(Item $component, RendererInterface $default_ //should introduce here htmlentities $value = $value; } - $cnt++; - if ($cnt % 2 == 1) { + $tpl->setCurrentBlock("property_cell"); + $tpl->setVariable("PROP_NAME", $name); + $tpl->setVariable("PROP_VAL", $value); + $tpl->parseCurrentBlock(); + if ($cnt % 2 === 1 || array_key_last($props) === $name) { $tpl->setCurrentBlock("property_row"); - $tpl->setVariable("PROP_NAME_A", $name); - $tpl->setVariable("PROP_VAL_A", $value); - } else { - $tpl->setVariable("PROP_NAME_B", $name); - $tpl->setVariable("PROP_VAL_B", $value); $tpl->parseCurrentBlock(); } - } - if ($cnt % 2 == 1) { - $tpl->parseCurrentBlock(); + $cnt++; } $tpl->setCurrentBlock("properties"); $tpl->parseCurrentBlock(); diff --git a/src/UI/templates/default/Item/tpl.item_notification.html b/src/UI/templates/default/Item/tpl.item_notification.html index 9dc7c9678dc5..b82b3ba06f9e 100644 --- a/src/UI/templates/default/Item/tpl.item_notification.html +++ b/src/UI/templates/default/Item/tpl.item_notification.html @@ -20,12 +20,11 @@

{TITLE}


+
- {PROP_NAME_A}{PROP_VAL_A} -
-
- {PROP_NAME_B}{PROP_VAL_B} + {PROP_NAME}{PROP_VAL}
+
@@ -37,4 +36,4 @@

{TITLE}

- \ No newline at end of file + diff --git a/src/UI/templates/default/Item/tpl.item_shy.html b/src/UI/templates/default/Item/tpl.item_shy.html index 44ba7df329a6..012849eb5470 100644 --- a/src/UI/templates/default/Item/tpl.item_shy.html +++ b/src/UI/templates/default/Item/tpl.item_shy.html @@ -9,8 +9,8 @@
-
{PROP_NAME_A}
-
{PROP_VAL_A}
+
{PROP_NAME}
+
{PROP_VAL}
diff --git a/src/UI/templates/default/Item/tpl.item_standard.html b/src/UI/templates/default/Item/tpl.item_standard.html index ba8dca02d767..2895298910eb 100644 --- a/src/UI/templates/default/Item/tpl.item_standard.html +++ b/src/UI/templates/default/Item/tpl.item_standard.html @@ -50,12 +50,11 @@

{TITLE}


+
- {PROP_NAME_A}{PROP_VAL_A} -
-
- {PROP_NAME_B}{PROP_VAL_B} + {PROP_NAME}{PROP_VAL}
+
@@ -72,4 +71,4 @@

{TITLE}

- \ No newline at end of file + diff --git a/tests/UI/Component/Item/ItemTest.php b/tests/UI/Component/Item/ItemTest.php index d266baea659e..2982b068f381 100644 --- a/tests/UI/Component/Item/ItemTest.php +++ b/tests/UI/Component/Item/ItemTest.php @@ -242,9 +242,6 @@ public function testRenderBase(): void
LocationRoom 123, Main Street 44, 3012 Bern
-
- -
EOT;