2020-05-29 13:41:58 +02:00
|
|
|
<?php
|
|
|
|
$groups = '';
|
2021-01-11 12:48:58 +01:00
|
|
|
$hasGroupSearch = false;
|
2021-10-20 09:39:12 +02:00
|
|
|
|
2020-05-29 13:41:58 +02:00
|
|
|
foreach ($data['children'] as $group) {
|
2021-10-20 09:39:12 +02:00
|
|
|
$groups .= $this->element('/genericElements/ListTopBar/group_' . (empty($group['type']) ? 'simple' : h($group['type'])), array(
|
|
|
|
'data' => $group,
|
|
|
|
'tableRandomValue' => $tableRandomValue,
|
|
|
|
'table_data' => $table_data,
|
|
|
|
));
|
2021-01-11 12:48:58 +01:00
|
|
|
$hasGroupSearch = $hasGroupSearch || (!empty($group['type']) && $group['type'] == 'search');
|
2020-05-29 13:41:58 +02:00
|
|
|
}
|
|
|
|
$tempClass = "btn-toolbar";
|
2021-01-11 12:48:58 +01:00
|
|
|
if (count($data['children']) > 1 && !$hasGroupSearch) {
|
2020-05-29 13:41:58 +02:00
|
|
|
$tempClass .= ' justify-content-between';
|
|
|
|
} else if (!empty($data['pull'])) {
|
|
|
|
$tempClass .= ' float-' . h($data['pull']);
|
|
|
|
}
|
|
|
|
echo sprintf(
|
|
|
|
'<div class="%s" role="toolbar" aria-label="Index toolbar">%s</div>',
|
|
|
|
$tempClass,
|
|
|
|
$groups
|
|
|
|
);
|
|
|
|
?>
|