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:
@@ -27,7 +27,6 @@ const AREA = 'admin';
|
|||||||
require __DIR__ . '/lib/init.php';
|
require __DIR__ . '/lib/init.php';
|
||||||
|
|
||||||
use Froxlor\Database\Database;
|
use Froxlor\Database\Database;
|
||||||
use Froxlor\FileDir;
|
|
||||||
use Froxlor\FroxlorLogger;
|
use Froxlor\FroxlorLogger;
|
||||||
use Froxlor\Language;
|
use Froxlor\Language;
|
||||||
use Froxlor\PhpHelper;
|
use Froxlor\PhpHelper;
|
||||||
@@ -63,6 +62,8 @@ $file_templates = [
|
|||||||
'index_html'
|
'index_html'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$languages = Language::getLanguages();
|
||||||
|
|
||||||
if ($action == '') {
|
if ($action == '') {
|
||||||
// email templates
|
// email templates
|
||||||
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_templates");
|
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_templates");
|
||||||
@@ -165,6 +166,13 @@ if ($action == '') {
|
|||||||
'pagination' => []
|
'pagination' => []
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if ($mail_actions_links === false) {
|
||||||
|
$mail_actions_links = [];
|
||||||
|
}
|
||||||
|
if ($file_actions_links === false) {
|
||||||
|
$file_actions_links = [];
|
||||||
|
}
|
||||||
|
|
||||||
UI::view('user/table-tpl.html.twig', [
|
UI::view('user/table-tpl.html.twig', [
|
||||||
'maillisting' => Listing::formatFromArray($collection_mail, $mailtpl_list_data['mailtpl_list']),
|
'maillisting' => Listing::formatFromArray($collection_mail, $mailtpl_list_data['mailtpl_list']),
|
||||||
'filelisting' => Listing::formatFromArray($collection_file, $filetpl_list_data['filetpl_list']),
|
'filelisting' => Listing::formatFromArray($collection_file, $filetpl_list_data['filetpl_list']),
|
||||||
|
|||||||
@@ -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
|
private static function generateTableHeadings(array $tabellisting): array
|
||||||
{
|
{
|
||||||
$heading = [];
|
$heading = [];
|
||||||
@@ -213,20 +231,6 @@ class Listing
|
|||||||
return $result;
|
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
|
* store column listing selection of user to database
|
||||||
* the selection array should look like this:
|
* the selection array should look like this:
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ return [
|
|||||||
'icon' => 'fa-solid fa-circle-check',
|
'icon' => 'fa-solid fa-circle-check',
|
||||||
'columns' => [
|
'columns' => [
|
||||||
'displayid' => [
|
'displayid' => [
|
||||||
'label' => lng('admin.integrityid'),
|
'label' => 'ID',
|
||||||
'field' => 'displayid'
|
'field' => 'displayid'
|
||||||
],
|
],
|
||||||
'checkdesc' => [
|
'checkdesc' => [
|
||||||
|
|||||||
@@ -380,7 +380,6 @@ return [
|
|||||||
],
|
],
|
||||||
'cronsettings' => 'Cronjob-Einstellungen',
|
'cronsettings' => 'Cronjob-Einstellungen',
|
||||||
'integritycheck' => 'Datenbankprüfung',
|
'integritycheck' => 'Datenbankprüfung',
|
||||||
'integrityid' => '#',
|
|
||||||
'integrityname' => 'Name',
|
'integrityname' => 'Name',
|
||||||
'integrityresult' => 'Ergebnis',
|
'integrityresult' => 'Ergebnis',
|
||||||
'integrityfix' => 'Probleme automatisch beheben',
|
'integrityfix' => 'Probleme automatisch beheben',
|
||||||
|
|||||||
@@ -384,7 +384,6 @@ return [
|
|||||||
],
|
],
|
||||||
'cronsettings' => 'Cronjob settings',
|
'cronsettings' => 'Cronjob settings',
|
||||||
'integritycheck' => 'Database validation',
|
'integritycheck' => 'Database validation',
|
||||||
'integrityid' => '#',
|
|
||||||
'integrityname' => 'Name',
|
'integrityname' => 'Name',
|
||||||
'integrityresult' => 'Result',
|
'integrityresult' => 'Result',
|
||||||
'integrityfix' => 'Fix problems automatically',
|
'integrityfix' => 'Fix problems automatically',
|
||||||
|
|||||||
Reference in New Issue
Block a user