fix column-customizer for non-api based resources; add more no_search=true tags in various tablelistings where search is not available

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-10-16 13:35:50 +02:00
parent 64142d2158
commit 68c93a17b3
8 changed files with 10 additions and 5 deletions

View File

@@ -258,7 +258,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
];
UI::view('user/table.html.twig', [
'listing' => Listing::formatFromArray($collection, $integrity_list_data['integrity_list']),
'listing' => Listing::formatFromArray($collection, $integrity_list_data['integrity_list'], 'integrity_list'),
'actions_links' => [
[
'href' => $linker->getLink(['section' => 'settings', 'page' => $page, 'action' => 'fix']),

View File

@@ -175,8 +175,8 @@ if ($action == '') {
}
UI::view('user/table-tpl.html.twig', [
'maillisting' => Listing::formatFromArray($collection_mail, $mailtpl_list_data['mailtpl_list']),
'filelisting' => Listing::formatFromArray($collection_file, $filetpl_list_data['filetpl_list']),
'maillisting' => Listing::formatFromArray($collection_mail, $mailtpl_list_data['mailtpl_list'], 'mailtpl_list'),
'filelisting' => Listing::formatFromArray($collection_file, $filetpl_list_data['filetpl_list'], 'filetpl_list'),
'actions_links' => array_merge($mail_actions_links, $file_actions_links)
]);
} elseif ($action == 'delete' && $subjectid != 0 && $mailbodyid != 0) {

View File

@@ -165,7 +165,7 @@ $collection = [
$tpl = 'user/table.html.twig';
UI::view($tpl, [
'listing' => Listing::formatFromArray($collection, $apikeys_list_data['apikeys_list']),
'listing' => Listing::formatFromArray($collection, $apikeys_list_data['apikeys_list'], 'apikyes_list'),
'actions_links' => (int)$userinfo['api_allowed'] == 1 ? [
[
'href' => $linker->getLink(['section' => 'index', 'page' => $page, 'action' => 'add']),

View File

@@ -57,9 +57,10 @@ class Listing
];
}
public static function formatFromArray(array $collection, array $tabellisting): array
public static function formatFromArray(array $collection, array $tabellisting, string $id): array
{
return [
'id' => $id,
'title' => $tabellisting['title'],
'description' => $tabellisting['description'] ?? null,
'icon' => $tabellisting['icon'] ?? null,

View File

@@ -31,6 +31,7 @@ return [
'icon' => 'fa-solid fa-file-lines',
'self_overview' => ['section' => 'templates', 'page' => 'email'],
'default_sorting' => ['template' => 'asc'],
'no_search' => true,
'columns' => [
'template' => [
'label' => lng('admin.templates.action'),

View File

@@ -33,6 +33,7 @@ return [
'icon' => 'fa-solid fa-circle-check',
'self_overview' => ['section' => 'settings', 'page' => 'integritycheck'],
'default_sorting' => ['displayid' => 'asc'],
'no_search' => true,
'columns' => [
'displayid' => [
'label' => 'ID',

View File

@@ -31,6 +31,7 @@ return [
'icon' => 'fa-solid fa-envelope',
'self_overview' => ['section' => 'templates', 'page' => 'email'],
'default_sorting' => ['template' => 'asc'],
'no_search' => true,
'columns' => [
'language' => [
'label' => lng('login.language'),

View File

@@ -33,6 +33,7 @@ return [
'title' => lng('menue.main.apikeys'),
'icon' => 'fa-solid fa-key',
'self_overview' => ['section' => 'index', 'page' => 'apikeys'],
'no_search' => true,
'columns' => [
'a.loginname' => [
'label' => lng('login.username'),