chg: [meta-template:index] Added link to metaTemplateNameDirectory
parent
47bebe5b68
commit
c2e9fd3b75
|
@ -56,6 +56,12 @@ class MetaTemplatesNavigation extends BaseNavigation
|
||||||
'url' => '/metaTemplates/prune_outdated_template',
|
'url' => '/metaTemplates/prune_outdated_template',
|
||||||
'isPOST' => true,
|
'isPOST' => true,
|
||||||
]);
|
]);
|
||||||
|
$this->bcf->addRoute('MetaTemplates', 'view_template_directory', [
|
||||||
|
'label' => __('View all known templates'),
|
||||||
|
'icon' => 'list',
|
||||||
|
'url' => '/metaTemplateNameDirectory/index',
|
||||||
|
'isRedirect' => true,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addParents()
|
public function addParents()
|
||||||
|
@ -78,7 +84,7 @@ class MetaTemplatesNavigation extends BaseNavigation
|
||||||
$totalUpdateCount = $udpateCount + $newCount;
|
$totalUpdateCount = $udpateCount + $newCount;
|
||||||
}
|
}
|
||||||
$updateAllActionConfig = [
|
$updateAllActionConfig = [
|
||||||
'label' => __('Update all template'),
|
'label' => __('Update all templates'),
|
||||||
'url' => '/metaTemplates/updateAllTemplates',
|
'url' => '/metaTemplates/updateAllTemplates',
|
||||||
'url_vars' => ['id' => 'id'],
|
'url_vars' => ['id' => 'id'],
|
||||||
];
|
];
|
||||||
|
@ -94,6 +100,9 @@ class MetaTemplatesNavigation extends BaseNavigation
|
||||||
'label' => __('Prune outdated templates'),
|
'label' => __('Prune outdated templates'),
|
||||||
'url' => '/metaTemplates/prune_outdated_template',
|
'url' => '/metaTemplates/prune_outdated_template',
|
||||||
]);
|
]);
|
||||||
|
$this->bcf->addAction('MetaTemplates', 'index', 'MetaTemplates', 'view_template_directory', [
|
||||||
|
'isRedirect' => true,
|
||||||
|
]);
|
||||||
|
|
||||||
if (empty($this->viewVars['templateStatus']['up-to-date'])) {
|
if (empty($this->viewVars['templateStatus']['up-to-date'])) {
|
||||||
$this->bcf->addAction('MetaTemplates', 'view', 'MetaTemplates', 'update', [
|
$this->bcf->addAction('MetaTemplates', 'view', 'MetaTemplates', 'update', [
|
||||||
|
|
|
@ -81,6 +81,8 @@ if (!empty($breadcrumb)) {
|
||||||
}
|
}
|
||||||
if (!empty($actionEntry['isPOST'])) {
|
if (!empty($actionEntry['isPOST'])) {
|
||||||
$onclickFunction = sprintf('UI.overlayUntilResolve(this, UI.submissionModalAutoGuess(\'%s\'))', h(Router::url($actionEntry['url'])));
|
$onclickFunction = sprintf('UI.overlayUntilResolve(this, UI.submissionModalAutoGuess(\'%s\'))', h(Router::url($actionEntry['url'])));
|
||||||
|
} else if (!empty($actionEntry['isRedirect'])) {
|
||||||
|
$onclickFunction = sprintf('window.location.replace(\'%s\');', h(Router::url($actionEntry['url'])));
|
||||||
} else {
|
} else {
|
||||||
$onclickFunction = sprintf('UI.overlayUntilResolve(this, UI.modalFromUrl(\'%s\'))', h(Router::url($actionEntry['url'])));
|
$onclickFunction = sprintf('UI.overlayUntilResolve(this, UI.modalFromUrl(\'%s\'))', h(Router::url($actionEntry['url'])));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue