cerebrate/templates/AuthKeys/index.php

73 lines
2.2 KiB
PHP
Raw Normal View History

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',
'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',
'element' => 'authkey',
2020-06-21 21:31:30 +02:00
'privacy' => 1
],
[
'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' => [
[
'open_modal' => '/authKeys/delete/[onclick_params_data_path]',
'modal_params_data_path' => 'id',
2020-06-21 21:31:30 +02:00
'icon' => 'trash'
]
]
]
]);