#12089 Add nowrap class to timestamp

This commit is contained in:
miguel angel rasteu 2023-09-19 17:21:44 +02:00
parent f5c4ce872b
commit 6609571482
1 changed files with 11 additions and 3 deletions

View File

@ -609,12 +609,20 @@ function ui_print_timestamp($unixtime, $return=false, $option=[])
$tag = 'span';
}
if (empty($option['style']) === true) {
$style = 'class="'.($option['class'] ?? 'nowrap').'"';
if (empty($option['class']) === false) {
$class = 'class="nowrap '.$option['class'].'"';
} else {
$style = 'style="'.$option['style'].'"';
$class = 'class="nowrap"';
}
if (empty($option['style']) === false) {
$style = 'style="'.$option['style'].'"';
} else {
$style = 'style=""';
}
$style .= ' '.$class;
if (empty($option['prominent']) === false) {
$prominent = $option['prominent'];
} else {