From 42c5200e5e0ed7103527769de274e977be5bb319 Mon Sep 17 00:00:00 2001 From: Robert Lange <robert.lange@uni-leipzig.de> Date: Fri, 2 Oct 2020 19:47:17 +0200 Subject: [PATCH] refs #17434 [finc] handle missing label in record tab description * if there is no key / label: ** use full width ** no table head ** no colon --- themes/finc/templates/RecordTab/description.phtml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/themes/finc/templates/RecordTab/description.phtml b/themes/finc/templates/RecordTab/description.phtml index cea530c6973..98d59dfadd4 100644 --- a/themes/finc/templates/RecordTab/description.phtml +++ b/themes/finc/templates/RecordTab/description.phtml @@ -13,7 +13,15 @@ $mainFields = $formatter->getData($driver, $formatter->getDefaults('description' <caption class="sr-only"><?=$this->transEsc('Description')?></caption> <?php if (!empty($mainFields)): ?> <?php foreach ($mainFields as $current): ?> - <tr><th><?=$this->transEsc($current['label'])?>:</th><td data-title="<?= $this->transEsc($current['label']) ?>:"><?=$current['value']?></td></tr> + <tr> + <?php if (!empty($current['label'])): ?> + <th><?=$this->transEsc($current['label'])?>:</th> + <td data-title="<?= $this->transEsc($current['label']) ?>:"> + <?php else: ?> + <td colspan="2"> + <?php endif; ?> + <?=$current['value']?></td> + </tr> <?php endforeach; ?> <?php else: ?> <tr><td><?=$this->transEsc('no_description')?></td></tr> -- GitLab