2023-02-27 12:16:36 +01:00
|
|
|
<?php
|
|
|
|
use Cake\Utility\Hash;
|
|
|
|
|
|
|
|
echo $this->element('genericElements/IndexTable/index_table', [
|
|
|
|
'data' => [
|
|
|
|
'data' => $data,
|
|
|
|
'top_bar' => [
|
|
|
|
'children' => [
|
|
|
|
[
|
|
|
|
'type' => 'search',
|
|
|
|
'button' => __('Search'),
|
|
|
|
'placeholder' => __('Enter value to search'),
|
|
|
|
'data' => '',
|
|
|
|
'searchKey' => 'value'
|
|
|
|
]
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'fields' => [
|
|
|
|
[
|
|
|
|
'name' => '#',
|
|
|
|
'sort' => 'id',
|
|
|
|
'data_path' => 'id',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('Name'),
|
|
|
|
'sort' => 'name',
|
|
|
|
'data_path' => 'name',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('Namespace'),
|
|
|
|
'sort' => 'namespace',
|
|
|
|
'data_path' => 'namespace',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('UUID'),
|
|
|
|
'sort' => 'uuid',
|
|
|
|
'data_path' => 'uuid'
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('Version'),
|
|
|
|
'sort' => 'version',
|
|
|
|
'data_path' => 'version',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('Associated Meta-Template'),
|
|
|
|
'sort' => 'meta_template.id',
|
|
|
|
'data_path' => 'meta_template.id',
|
|
|
|
'element' => 'function',
|
|
|
|
'function' => function($row, $viewContext) {
|
2023-03-23 13:35:45 +01:00
|
|
|
return $viewContext->Bootstrap->node('a', [
|
2023-02-27 12:16:36 +01:00
|
|
|
'href' => h($baseurl . '/metaTemplates/view/' . $row->meta_template->id ?? ''),
|
|
|
|
], !empty($row->meta_template->name) ? (sprintf('%s (v%s)', h($row->meta_template->name), h($row->meta_template->version))) :'');
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'title' => __('Meta Template Name Directory'),
|
|
|
|
'description' => __('The directory of all meta templates known by the system.'),
|
|
|
|
'actions' => []
|
|
|
|
]
|
|
|
|
]);
|