2021-01-13 14:30:44 +01:00
|
|
|
<?php
|
|
|
|
echo $this->element('genericElements/IndexTable/index_table', [
|
|
|
|
'data' => [
|
|
|
|
'data' => $data,
|
|
|
|
'top_bar' => [
|
|
|
|
'children' => [
|
2022-12-07 14:54:28 +01:00
|
|
|
[
|
|
|
|
'type' => 'simple',
|
|
|
|
'children' => [
|
|
|
|
'data' => [
|
|
|
|
'type' => 'simple',
|
|
|
|
'text' => __('Download All'),
|
|
|
|
'popover_url' => sprintf('/broods/downloadOrg/%s/all', h($brood_id)),
|
|
|
|
]
|
|
|
|
]
|
|
|
|
],
|
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',
|
|
|
|
'additionalUrlParams' => $brood_id . '/organisations'
|
|
|
|
]
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'fields' => [
|
|
|
|
[
|
|
|
|
'name' => '#',
|
|
|
|
'sort' => 'id',
|
|
|
|
'class' => 'short',
|
|
|
|
'data_path' => 'id',
|
|
|
|
],
|
2022-12-07 14:54:28 +01:00
|
|
|
[
|
|
|
|
'name' => __('Status'),
|
|
|
|
'class' => 'short',
|
|
|
|
'data_path' => 'status',
|
|
|
|
'display_field_data_path' => 'name',
|
|
|
|
'sort' => 'status',
|
|
|
|
'element' => 'brood_sync_status',
|
|
|
|
],
|
2021-01-13 14:30:44 +01:00
|
|
|
[
|
|
|
|
'name' => __('Name'),
|
|
|
|
'class' => 'short',
|
|
|
|
'data_path' => 'name',
|
|
|
|
'sort' => 'name'
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('UUID'),
|
|
|
|
'class' => 'short',
|
|
|
|
'data_path' => 'uuid',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('URL'),
|
|
|
|
'class' => 'short',
|
|
|
|
'data_path' => 'url',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('Nationality'),
|
|
|
|
'data_path' => 'nationality',
|
|
|
|
'sort' => 'nationality'
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('Sector'),
|
|
|
|
'data_path' => 'sector',
|
|
|
|
'sort' => 'sector'
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('Type'),
|
|
|
|
'data_path' => 'type',
|
|
|
|
'sort' => 'type'
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'title' => __('Organisation Index'),
|
|
|
|
'pull' => 'right',
|
|
|
|
'actions' => [
|
|
|
|
[
|
2022-12-07 14:54:28 +01:00
|
|
|
'open_modal' => '/broods/downloadOrg/' . $brood_id . '/[onclick_params_data_path]',
|
|
|
|
'modal_params_data_path' => 'id',
|
2021-01-13 14:30:44 +01:00
|
|
|
'title' => __('Download'),
|
|
|
|
'icon' => 'download'
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]);
|
|
|
|
echo '</div>';
|
|
|
|
?>
|