chg: [index] factories modified to make index views leaner for ajax rendering
parent
2f8c3ebe3a
commit
b4fe51966d
|
@ -18,10 +18,10 @@
|
|||
*/
|
||||
$tableRandomValue = Cake\Utility\Security::randomString(8);
|
||||
echo '<div id="table-container-' . h($tableRandomValue) . '">';
|
||||
if (!empty($data['title'])) {
|
||||
if (!$ajax && !empty($data['title'])) {
|
||||
echo sprintf('<h2>%s</h2>', h($data['title']));
|
||||
}
|
||||
if (!empty($data['description'])) {
|
||||
if (!$ajax && !empty($data['description'])) {
|
||||
echo sprintf(
|
||||
'<div>%s</div>',
|
||||
empty($data['description']) ? '' : h($data['description'])
|
||||
|
@ -40,10 +40,12 @@
|
|||
'tableRandomValue' => $tableRandomValue
|
||||
)
|
||||
);
|
||||
if (!$ajax) {
|
||||
echo $this->element(
|
||||
'/genericElements/IndexTable/pagination_links'
|
||||
);
|
||||
}
|
||||
}
|
||||
if (!empty($data['top_bar'])) {
|
||||
echo $this->element(
|
||||
'/genericElements/ListTopBar/scaffold',
|
||||
|
|
Loading…
Reference in New Issue