chg: [setting] Improved UI of notice
parent
c1459b4867
commit
2a7fc06471
|
@ -36,7 +36,12 @@ foreach (array_keys($mainNoticeHeading) as $level) {
|
||||||
'badge-variant' => $variant,
|
'badge-variant' => $variant,
|
||||||
'description' => $noticeDescriptionPerLevel[$level],
|
'description' => $noticeDescriptionPerLevel[$level],
|
||||||
];
|
];
|
||||||
$settingNoticeListHeader[] = $level;
|
$settingNoticeListHeader[] = [
|
||||||
|
'html' => $this->Bootstrap->badge([
|
||||||
|
'variant' => $variantFromSeverity[$level],
|
||||||
|
'text' => $level
|
||||||
|
])
|
||||||
|
];
|
||||||
$settingNoticeList[] = $this->Bootstrap->table([
|
$settingNoticeList[] = $this->Bootstrap->table([
|
||||||
'small' => true,
|
'small' => true,
|
||||||
'striped' => false,
|
'striped' => false,
|
||||||
|
@ -53,7 +58,7 @@ foreach (array_keys($mainNoticeHeading) as $level) {
|
||||||
return '<span class="text-nowrap">' . h(str_replace('.', ' ▸ ', $path)) . '</span>';
|
return '<span class="text-nowrap">' . h(str_replace('.', ' ▸ ', $path)) . '</span>';
|
||||||
}],
|
}],
|
||||||
['key' => 'value', 'label' => __('Value'), 'formatter' => function($value, $row) {
|
['key' => 'value', 'label' => __('Value'), 'formatter' => function($value, $row) {
|
||||||
$formatedValue = '<pre class="p-1 rounded mb-0" style="background: #eeeeee55;">';
|
$formatedValue = '<span class="p-1 rounded mb-0" style="background: #eeeeee55; font-family: monospace;">';
|
||||||
if (is_null($value)) {
|
if (is_null($value)) {
|
||||||
$formatedValue .= '<i class="text-nowrap">' . __('No value') . '</i>';
|
$formatedValue .= '<i class="text-nowrap">' . __('No value') . '</i>';
|
||||||
} else if ($value === '') {
|
} else if ($value === '') {
|
||||||
|
@ -63,7 +68,7 @@ foreach (array_keys($mainNoticeHeading) as $level) {
|
||||||
} else {
|
} else {
|
||||||
$formatedValue .= h($value);
|
$formatedValue .= h($value);
|
||||||
}
|
}
|
||||||
$formatedValue .= '</pre>';
|
$formatedValue .= '</span>';
|
||||||
return $formatedValue;
|
return $formatedValue;
|
||||||
}],
|
}],
|
||||||
['key' => 'description', 'label' => __('Description')]
|
['key' => 'description', 'label' => __('Description')]
|
||||||
|
|
Loading…
Reference in New Issue