Bootstrap->alert([
'variant' => 'success',
'text' => __('This meta-template is already up-to-date!'),
'dismissible' => false,
]);
$modalType = 'ok-only';
} else {
if ($updateableTemplate['updateable']) {
$bodyHtml .= $this->Bootstrap->alert([
'variant' => 'success',
'html' => __('This meta-template can be updated to version {0} (current: {1}).', sprintf('%s', h($templateOnDisk['version'])), h($metaTemplate->version)),
'dismissible' => false,
]);
} else {
$modalSize = 'xl';
$bodyHtml .= $this->Bootstrap->alert([
'variant' => 'warning',
'text' => __('Updating to version {0} cannot be done automatically as it introduces some conflicts.', h($templateOnDisk['version'])),
'dismissible' => false,
]);
$conflictTable = $this->element('MetaTemplates/conflictTable', [
'updateableTemplate' => $updateableTemplate,
'metaTemplate' => $metaTemplate,
'templateOnDisk' => $templateOnDisk,
]);
$bodyHtml .= $this->Bootstrap->collapse([
'title' => __('View conflicts'),
'open' => false
], $conflictTable);
$bodyHtml .= $this->element('MetaTemplates/conflictResolution', [
'updateableTemplate' => $updateableTemplate,
'metaTemplate' => $metaTemplate,
'templateOnDisk' => $templateOnDisk,
]);
}
}
echo $this->Bootstrap->modal([
'title' => __('Update Meta Templates #{0} ?', h($metaTemplate->id)),
'bodyHtml' => $bodyHtml,
'size' => $modalSize,
'type' => $modalType,
'confirmText' => __('Update meta-templates'),
'confirmFunction' => 'updateMetaTemplate',
]);
?>