2021-01-13 14:30:44 +01:00
< ? php
echo $this -> element ( 'genericElements/IndexTable/index_table' , [
'data' => [
'data' => $data ,
'top_bar' => [
'children' => [
[
'type' => 'simple' ,
'children' => [
'data' => [
'type' => 'simple' ,
'text' => __ ( 'Add brood' ),
'popover_url' => '/broods/add'
]
]
],
2021-01-14 12:42:05 +01:00
[
'type' => 'context_filters' ,
'context_filters' => $filteringContexts
],
2021-01-13 14:30:44 +01:00
[
'type' => 'search' ,
2021-11-10 15:31:09 +01:00
'button' => __ ( 'Search' ),
2021-01-13 14:30:44 +01:00
'placeholder' => __ ( 'Enter value to search' ),
'data' => '' ,
'searchKey' => 'value'
]
]
],
'fields' => [
[
'name' => '#' ,
'sort' => 'id' ,
'data_path' => 'id' ,
],
[
'name' => __ ( 'Name' ),
'sort' => 'name' ,
'data_path' => 'name' ,
],
[
'name' => 'Connection test' ,
'data_path' => 'id' ,
'element' => 'connection_test'
],
[
'name' => __ ( 'Url' ),
'sort' => 'url' ,
'data_path' => 'url' ,
],
[
'name' => __ ( 'Description' ),
'data_path' => 'description' ,
],
[
'name' => __ ( 'Owner Organisation' ),
'sort' => 'organisation.name' ,
'data_path' => 'organisation' ,
'element' => 'org'
]
],
'title' => __ ( 'Broods Index' ),
'description' => __ ( 'Cerebrate can connect to other Cerebrate instances to exchange trust information and to instrument interconnectivity between connected local tools. Each such Cerebrate instance with its connected tools is considered to be a brood.' ),
2023-09-27 12:05:48 +02:00
'includeAllPagination' => true ,
2021-01-13 14:30:44 +01:00
'pull' => 'right' ,
'actions' => [
[
'url' => '/broods/view' ,
'url_params_data_paths' => [ 'id' ],
2021-06-01 07:46:29 +02:00
'title' => __ ( 'View details' ),
2021-01-13 14:30:44 +01:00
'icon' => 'eye'
],
2021-06-01 07:46:29 +02:00
[
'url' => '/localTools/broodTools' ,
'url_params_data_paths' => [ 'id' ],
'title' => __ ( 'List available local tools' ),
'icon' => 'wrench'
],
2021-01-13 14:30:44 +01:00
[
2021-01-14 12:42:05 +01:00
'open_modal' => '/broods/edit/[onclick_params_data_path]' ,
'modal_params_data_path' => 'id' ,
2021-01-13 14:30:44 +01:00
'icon' => 'edit'
],
[
2021-01-14 12:42:05 +01:00
'open_modal' => '/broods/delete/[onclick_params_data_path]' ,
'modal_params_data_path' => 'id' ,
2021-01-13 14:30:44 +01:00
'icon' => 'trash'
2021-01-14 12:42:05 +01:00
],
2021-01-13 14:30:44 +01:00
]
]
]);
echo '</div>' ;
?>