2020-06-21 21:31:30 +02:00
|
|
|
<?php
|
|
|
|
echo $this->element('genericElements/IndexTable/index_table', [
|
|
|
|
'data' => [
|
|
|
|
'data' => $data,
|
|
|
|
'top_bar' => [
|
|
|
|
'children' => [
|
|
|
|
[
|
|
|
|
'type' => 'simple',
|
|
|
|
'children' => [
|
|
|
|
'data' => [
|
|
|
|
'type' => 'simple',
|
|
|
|
'text' => __('Add authentication key'),
|
|
|
|
'popover_url' => '/authKeys/add'
|
|
|
|
]
|
|
|
|
]
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'type' => 'search',
|
2021-11-10 15:31:09 +01:00
|
|
|
'button' => __('Search'),
|
2020-06-21 21:31:30 +02:00
|
|
|
'placeholder' => __('Enter value to search'),
|
|
|
|
'data' => '',
|
|
|
|
'searchKey' => 'value'
|
|
|
|
]
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'fields' => [
|
|
|
|
[
|
|
|
|
'name' => '#',
|
|
|
|
'sort' => 'id',
|
|
|
|
'data_path' => 'id',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('User'),
|
|
|
|
'sort' => 'user.username',
|
|
|
|
'data_path' => 'user.username',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('Auth key'),
|
|
|
|
'sort' => 'authkey',
|
2020-08-07 21:47:04 +02:00
|
|
|
'element' => 'authkey',
|
2020-06-21 21:31:30 +02:00
|
|
|
'privacy' => 1
|
2020-08-07 21:47:04 +02:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('Expiration'),
|
|
|
|
'sort' => 'expiration',
|
|
|
|
'data_path' => 'expiration',
|
|
|
|
'element' => 'expiration'
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('Disabled'),
|
|
|
|
'sort' => 'disabled',
|
|
|
|
'data_path' => 'disabled',
|
|
|
|
'element' => 'boolean'
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => __('Comment'),
|
|
|
|
'sort' => 'comment',
|
|
|
|
'data_path' => 'comment',
|
|
|
|
],
|
2020-06-21 21:31:30 +02:00
|
|
|
],
|
|
|
|
'title' => __('Authentication key Index'),
|
|
|
|
'description' => __('A list of API keys bound to a user.'),
|
|
|
|
'pull' => 'right',
|
|
|
|
'actions' => [
|
|
|
|
[
|
2021-01-11 16:28:07 +01:00
|
|
|
'open_modal' => '/authKeys/delete/[onclick_params_data_path]',
|
|
|
|
'modal_params_data_path' => 'id',
|
2020-06-21 21:31:30 +02:00
|
|
|
'icon' => 'trash'
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]);
|