forked from Public/pics
Management controllers: make format functions first-level
This commit is contained in:
@@ -37,26 +37,20 @@ class ManageUsers extends HTMLController
|
||||
'surname' => [
|
||||
'header' => 'Last name',
|
||||
'is_sortable' => true,
|
||||
'format' => [
|
||||
'link' => BASEURL . '/edituser/?id={ID_USER}',
|
||||
'data' => 'surname',
|
||||
],
|
||||
'link' => BASEURL . '/edituser/?id={ID_USER}',
|
||||
'value' => 'surname',
|
||||
],
|
||||
'first_name' => [
|
||||
'header' => 'First name',
|
||||
'is_sortable' => true,
|
||||
'format' => [
|
||||
'link' => BASEURL . '/edituser/?id={ID_USER}',
|
||||
'data' => 'first_name',
|
||||
],
|
||||
'link' => BASEURL . '/edituser/?id={ID_USER}',
|
||||
'value' => 'first_name',
|
||||
],
|
||||
'slug' => [
|
||||
'header' => 'Slug',
|
||||
'is_sortable' => true,
|
||||
'format' => [
|
||||
'link' => BASEURL . '/edituser/?id={ID_USER}',
|
||||
'data' => 'slug',
|
||||
],
|
||||
'link' => BASEURL . '/edituser/?id={ID_USER}',
|
||||
'value' => 'slug',
|
||||
],
|
||||
'emailaddress' => [
|
||||
'value' => 'emailaddress',
|
||||
@@ -82,12 +76,7 @@ class ManageUsers extends HTMLController
|
||||
'is_admin' => [
|
||||
'is_sortable' => true,
|
||||
'header' => 'Admin?',
|
||||
'format' => [
|
||||
'type' => 'function',
|
||||
'data' => function($row) {
|
||||
return $row['is_admin'] ? 'yes' : 'no';
|
||||
}
|
||||
],
|
||||
'format' => fn($row) => $row['is_admin'] ? 'yes' : 'no',
|
||||
],
|
||||
],
|
||||
'default_sort_order' => 'id_user',
|
||||
|
||||
Reference in New Issue
Block a user