fix: [UI] reverted ajax index tables not having the title/description

- messes with the pagination
remotes/origin/main
iglocska 2020-06-23 00:58:27 +02:00
parent 3f01b9ddb5
commit 7c9e44164c
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 5 additions and 7 deletions

View File

@ -18,10 +18,10 @@
*/ */
$tableRandomValue = Cake\Utility\Security::randomString(8); $tableRandomValue = Cake\Utility\Security::randomString(8);
echo '<div id="table-container-' . h($tableRandomValue) . '">'; echo '<div id="table-container-' . h($tableRandomValue) . '">';
if (!$ajax && !empty($data['title'])) { if (!empty($data['title'])) {
echo sprintf('<h2>%s</h2>', h($data['title'])); echo sprintf('<h2>%s</h2>', h($data['title']));
} }
if (!$ajax && !empty($data['description'])) { if (!empty($data['description'])) {
echo sprintf( echo sprintf(
'<div>%s</div>', '<div>%s</div>',
empty($data['description']) ? '' : h($data['description']) empty($data['description']) ? '' : h($data['description'])
@ -40,12 +40,10 @@
'tableRandomValue' => $tableRandomValue 'tableRandomValue' => $tableRandomValue
] ]
); );
if (!$ajax) {
echo $this->element( echo $this->element(
'/genericElements/IndexTable/pagination_links' '/genericElements/IndexTable/pagination_links'
); );
} }
}
if (!empty($data['top_bar'])) { if (!empty($data['top_bar'])) {
echo $this->element( echo $this->element(
'/genericElements/ListTopBar/scaffold', '/genericElements/ListTopBar/scaffold',