minor fix in templates due to new Language class + other minor language fixes

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-05-21 17:29:14 +02:00
parent 309abc6150
commit 1de39ac39c
5 changed files with 28 additions and 18 deletions

View File

@@ -55,6 +55,24 @@ class Listing
];
}
public static function formatFromArray(array $collection, array $tabellisting): array
{
return [
'title' => $tabellisting['title'],
'icon' => $tabellisting['icon'],
'description' => $tabellisting['description'] ?? null,
'icon' => $tabellisting['icon'] ?? null,
'table' => [
'th' => self::generateTableHeadings($tabellisting),
'tr' => self::generateTableRows($collection['data'], $tabellisting),
],
'pagination' => $collection['pagination'],
'empty_msg' => $tabellisting['empty_msg'] ?? null,
'self_overview' => $tabellisting['self_overview'] ?? [],
'available_columns' => self::getAvailableColumnsForListing($tabellisting)
];
}
private static function generateTableHeadings(array $tabellisting): array
{
$heading = [];
@@ -213,20 +231,6 @@ class Listing
return $result;
}
public static function formatFromArray(array $collection, array $tabellisting): array
{
return [
'title' => $tabellisting['title'],
'icon' => $tabellisting['icon'],
'table' => [
'th' => self::generateTableHeadings($tabellisting),
'tr' => self::generateTableRows($collection['data'], $tabellisting),
],
'pagination' => $collection['pagination'],
'empty_msg' => $tabellisting['empty_msg'] ?? null
];
}
/**
* store column listing selection of user to database
* the selection array should look like this: