2020-12-07 09:52:35 +01:00
|
|
|
<?php
|
2021-11-03 11:47:10 +01:00
|
|
|
|
|
|
|
$backupTemplates = $this->Form->getTemplates();
|
2020-12-07 09:52:35 +01:00
|
|
|
$tabData = [];
|
2021-11-08 14:08:47 +01:00
|
|
|
foreach ($entity->MetaTemplates as $i => $metaTemplate) {
|
2021-12-08 11:11:46 +01:00
|
|
|
$tabData['navs'][$i] = [
|
|
|
|
'html' => $this->element('/genericElements/MetaTemplates/metaTemplateNav', ['metaTemplate' => $metaTemplate])
|
|
|
|
];
|
2020-12-07 09:52:35 +01:00
|
|
|
$fieldsHtml = '';
|
2021-12-08 11:11:46 +01:00
|
|
|
$fieldsHtml .= $this->element(
|
|
|
|
'genericElements/Form/metaTemplateForm',
|
|
|
|
[
|
|
|
|
'metaTemplate' => $metaTemplate,
|
|
|
|
]
|
|
|
|
);
|
2020-12-07 09:52:35 +01:00
|
|
|
$tabData['content'][$i] = $fieldsHtml;
|
|
|
|
}
|
2021-11-04 10:47:03 +01:00
|
|
|
$this->Form->setTemplates($backupTemplates);
|
2020-12-07 09:52:35 +01:00
|
|
|
echo $this->Bootstrap->Tabs([
|
|
|
|
'pills' => true,
|
|
|
|
'data' => $tabData,
|
2021-11-04 15:19:45 +01:00
|
|
|
'nav-class' => ['shadow mb-3 p-2 rounded'],
|
|
|
|
'content-class' => ['pt-2 px-3']
|
2021-11-03 11:47:10 +01:00
|
|
|
]);
|