chg: [genericELements:index_table] Tabler head accept icons
parent
b8bc79e072
commit
695fcdaf26
|
@ -3,11 +3,27 @@
|
||||||
foreach ($fields as $k => $header) {
|
foreach ($fields as $k => $header) {
|
||||||
if (!isset($header['requirement']) || $header['requirement']) {
|
if (!isset($header['requirement']) || $header['requirement']) {
|
||||||
$header_data = '';
|
$header_data = '';
|
||||||
|
$icon_html = '';
|
||||||
|
if (!empty($header['icon'])) {
|
||||||
|
$icon_html = $this->Bootstrap->icon($header['icon'], ['class' => ['d-inline me-1']]);
|
||||||
|
}
|
||||||
if (!empty($header['sort'])) {
|
if (!empty($header['sort'])) {
|
||||||
if (!empty($header['name'])) {
|
if (!empty($header['name'])) {
|
||||||
$header_data = $paginator->sort($header['sort'], $header['name']);
|
$header_data = $paginator->sort(
|
||||||
|
$header['sort'],
|
||||||
|
sprintf('%s%s', $icon_html, h($header['name'])),
|
||||||
|
['escape' => false]
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
|
if (empty($icon_html)) {
|
||||||
$header_data = $paginator->sort($header['sort']);
|
$header_data = $paginator->sort($header['sort']);
|
||||||
|
} else {
|
||||||
|
$header_data = $paginator->sort(
|
||||||
|
$header['sort'],
|
||||||
|
$icon_html,
|
||||||
|
['escape' => false]
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!empty($header['element']) && $header['element'] === 'selector') {
|
if (!empty($header['element']) && $header['element'] === 'selector') {
|
||||||
|
|
|
@ -42,7 +42,7 @@ if (!empty($data['title'])) {
|
||||||
echo Text::insert(
|
echo Text::insert(
|
||||||
'<h2 class="fw-light">:title :help</h2>',
|
'<h2 class="fw-light">:title :help</h2>',
|
||||||
[
|
[
|
||||||
'title' => h($data['title']),
|
'title' => $this->ValueGetter->get($data['title']),
|
||||||
'help' => $this->Bootstrap->icon('info', [
|
'help' => $this->Bootstrap->icon('info', [
|
||||||
'class' => ['fs-6', 'align-text-top',],
|
'class' => ['fs-6', 'align-text-top',],
|
||||||
'title' => empty($data['description']) ? '' : h($data['description']),
|
'title' => empty($data['description']) ? '' : h($data['description']),
|
||||||
|
|
Loading…
Reference in New Issue