2020-06-21 23:53:38 +02:00
< ? php
echo $this -> element ( 'genericElements/IndexTable/index_table' , [
'data' => [
'data' => $data ,
'top_bar' => [
'children' => [
[
'type' => 'simple' ,
'children' => [
'data' => [
'type' => 'simple' ,
'text' => __ ( 'Add organisation' ),
'class' => 'btn btn-primary' ,
'popover_url' => '/organisations/add'
]
]
],
2021-02-26 10:36:06 +01:00
[
'type' => 'context_filters' ,
'context_filters' => $filteringContexts
],
2020-06-21 23:53:38 +02:00
[
'type' => 'search' ,
2021-03-10 09:43:36 +01:00
'button' => __ ( 'Search' ),
2020-06-21 23:53:38 +02:00
'placeholder' => __ ( 'Enter value to search' ),
'data' => '' ,
2021-03-10 09:43:36 +01:00
'searchKey' => 'value' ,
'allowFilering' => true
2021-10-20 09:39:12 +02:00
],
[
'type' => 'table_action' ,
'table_setting_id' => 'organisation_index' ,
2020-06-21 23:53:38 +02:00
]
]
],
'fields' => [
[
'name' => '#' ,
'sort' => 'id' ,
'class' => 'short' ,
'data_path' => 'id' ,
],
[
'name' => __ ( 'Name' ),
'class' => 'short' ,
'data_path' => 'name' ,
],
[
'name' => __ ( 'UUID' ),
'sort' => 'uuid' ,
'class' => 'short' ,
'data_path' => 'uuid' ,
],
[
'name' => __ ( 'Members' ),
'data_path' => 'alignments' ,
'element' => 'count_summary' ,
'url' => '/individuals/index/?Organisations.id={{url_data}}' ,
'url_data_path' => 'id'
],
[
'name' => __ ( 'URL' ),
'sort' => 'url' ,
'class' => 'short' ,
'data_path' => 'url' ,
],
[
'name' => __ ( 'Nationality' ),
'data_path' => 'nationality' ,
],
[
'name' => __ ( 'Sector' ),
'data_path' => 'sector' ,
],
[
'name' => __ ( 'Type' ),
'data_path' => 'type' ,
2021-09-02 11:52:47 +02:00
],
[
'name' => __ ( 'Tags' ),
'data_path' => 'tags' ,
'element' => 'tags' ,
],
2020-06-21 23:53:38 +02:00
],
'title' => __ ( 'ContactDB Organisation Index' ),
'description' => __ ( 'A list of organisations known by your Cerebrate instance. This list can get populated either directly, by adding new organisations or by fetching them from trusted remote sources.' ),
'pull' => 'right' ,
'actions' => [
[
'url' => '/organisations/view' ,
'url_params_data_paths' => [ 'id' ],
'icon' => 'eye'
],
[
2021-01-11 16:28:07 +01:00
'open_modal' => '/organisations/edit/[onclick_params_data_path]' ,
'modal_params_data_path' => 'id' ,
2020-06-21 23:53:38 +02:00
'icon' => 'edit'
],
[
2021-01-11 16:28:07 +01:00
'open_modal' => '/organisations/delete/[onclick_params_data_path]' ,
'modal_params_data_path' => 'id' ,
2020-06-21 23:53:38 +02:00
'icon' => 'trash'
2021-01-11 16:28:07 +01:00
],
2020-06-21 23:53:38 +02:00
]
]
]);
echo '</div>' ;
?>