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);
|
$tableRandomValue = Cake\Utility\Security::randomString(8);
|
||||||
echo '<div id="table-container-' . h($tableRandomValue) . '">';
|
echo '<div id="table-container-' . h($tableRandomValue) . '">';
|
||||||
if (!empty($data['title'])) {
|
if (!$ajax && !empty($data['title'])) {
|
||||||
echo sprintf('<h2>%s</h2>', h($data['title']));
|
echo sprintf('<h2>%s</h2>', h($data['title']));
|
||||||
}
|
}
|
||||||
if (!empty($data['description'])) {
|
if (!$ajax && !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,9 +40,11 @@
|
||||||
'tableRandomValue' => $tableRandomValue
|
'tableRandomValue' => $tableRandomValue
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
echo $this->element(
|
if (!$ajax) {
|
||||||
'/genericElements/IndexTable/pagination_links'
|
echo $this->element(
|
||||||
);
|
'/genericElements/IndexTable/pagination_links'
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!empty($data['top_bar'])) {
|
if (!empty($data['top_bar'])) {
|
||||||
echo $this->element(
|
echo $this->element(
|
||||||
|
|
Loading…
Reference in New Issue