chg: [roles:index] Only show `add role` button for users having ACL access
parent
487670e522
commit
a67c6b70d5
|
@ -1,10 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
echo $this->element('genericElements/IndexTable/index_table', [
|
$topbarChildren = [];
|
||||||
'data' => [
|
if (!empty($loggedUser->role->perm_admin)) {
|
||||||
'data' => $data,
|
$topbarChildren[] = [
|
||||||
'top_bar' => [
|
|
||||||
'children' => [
|
|
||||||
[
|
|
||||||
'type' => 'simple',
|
'type' => 'simple',
|
||||||
'children' => [
|
'children' => [
|
||||||
'data' => [
|
'data' => [
|
||||||
|
@ -14,15 +11,21 @@ echo $this->element('genericElements/IndexTable/index_table', [
|
||||||
'popover_url' => '/roles/add'
|
'popover_url' => '/roles/add'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
],
|
];
|
||||||
[
|
}
|
||||||
|
$topbarChildren[] = [
|
||||||
'type' => 'search',
|
'type' => 'search',
|
||||||
'button' => __('Search'),
|
'button' => __('Search'),
|
||||||
'placeholder' => __('Enter value to search'),
|
'placeholder' => __('Enter value to search'),
|
||||||
'data' => '',
|
'data' => '',
|
||||||
'searchKey' => 'value'
|
'searchKey' => 'value'
|
||||||
]
|
];
|
||||||
]
|
|
||||||
|
echo $this->element('genericElements/IndexTable/index_table', [
|
||||||
|
'data' => [
|
||||||
|
'data' => $data,
|
||||||
|
'top_bar' => [
|
||||||
|
'children' => $topbarChildren,
|
||||||
],
|
],
|
||||||
'fields' => [
|
'fields' => [
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue