Impfverwaltung anpassen
This commit is contained in:
@@ -87,6 +87,26 @@ if (!function_exists('impfWeekdayName')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfLimitLabelLength')) {
|
||||
function impfLimitLabelLength(string $text, int $maxLength = 50): string
|
||||
{
|
||||
$text = trim($text);
|
||||
if ($text === '') {
|
||||
return $text;
|
||||
}
|
||||
|
||||
if (function_exists('mb_strimwidth')) {
|
||||
return rtrim(mb_strimwidth($text, 0, $maxLength, '...', 'UTF-8'));
|
||||
}
|
||||
|
||||
if (strlen($text) <= $maxLength) {
|
||||
return $text;
|
||||
}
|
||||
|
||||
return rtrim(substr($text, 0, max(0, $maxLength - 3))) . '...';
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowEnsureTables')) {
|
||||
function impfWorkflowEnsureTables(PDO $pdo): void
|
||||
{
|
||||
@@ -336,12 +356,7 @@ if (!function_exists('impfZeitraumLabel')) {
|
||||
$zeitText .= ' (' . $ortText . ')';
|
||||
}
|
||||
|
||||
$bezeichnung = trim((string)($zeitraum['bezeichnung'] ?? ''));
|
||||
if ($includeName && $bezeichnung !== '') {
|
||||
return $bezeichnung . ': ' . $zeitText;
|
||||
}
|
||||
|
||||
return $zeitText;
|
||||
return impfLimitLabelLength($zeitText, 50);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user