add more columns for custom-column selection (customer view)

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-05-15 18:39:36 +02:00
parent b12d9abaf2
commit 14d5c9da6c
5 changed files with 46 additions and 5 deletions

View File

@@ -40,4 +40,16 @@ class Email
] ]
]; ];
} }
public static function forwarderList(array $attributes)
{
$forwarders = explode(" ", $attributes['data']);
if (($key = array_search($attributes['fields']['email_full'], $forwarders)) !== false) {
unset($forwarders[$key]);
}
if (count($forwarders) > 0) {
return implode("<br>", $forwarders);
}
return "";
}
} }

View File

@@ -25,6 +25,7 @@
use Froxlor\UI\Callbacks\Domain; use Froxlor\UI\Callbacks\Domain;
use Froxlor\UI\Callbacks\Style; use Froxlor\UI\Callbacks\Style;
use Froxlor\UI\Callbacks\Text;
use Froxlor\UI\Listing; use Froxlor\UI\Listing;
return [ return [
@@ -33,9 +34,6 @@ return [
'icon' => 'fa-solid fa-globe', 'icon' => 'fa-solid fa-globe',
'self_overview' => ['section' => 'domains', 'page' => 'domains'], 'self_overview' => ['section' => 'domains', 'page' => 'domains'],
'columns' => [ 'columns' => [
'ad.id' => [
'field' => 'aliasdomainid'
],
'd.domain_ace' => [ 'd.domain_ace' => [
'label' => lng('domains.domainname'), 'label' => lng('domains.domainname'),
'field' => 'domain_ace', 'field' => 'domain_ace',
@@ -45,7 +43,36 @@ return [
'label' => lng('panel.path'), 'label' => lng('panel.path'),
'field' => 'documentroot', 'field' => 'documentroot',
'callback' => [Domain::class, 'domainTarget'], 'callback' => [Domain::class, 'domainTarget'],
] ],
'd.isbinddomain' => [
'label' => lng('domains.isbinddomain'),
'field' => 'isbinddomain',
'callback' => [Text::class, 'boolean'],
],
'd.isemaildomain' => [
'label' => lng('admin.emaildomain'),
'field' => 'isemaildomain',
'callback' => [Text::class, 'boolean'],
],
'd.email_only' => [
'label' => lng('admin.email_only'),
'field' => 'email_only',
'callback' => [Text::class, 'boolean'],
],
'd.iswildcarddomain' => [
'label' => lng('domains.serveraliasoption_wildcard'),
'field' => 'iswildcarddomain',
'callback' => [Text::class, 'boolean'],
],
'd.letsencrypt' => [
'label' => lng('panel.letsencrypt'),
'field' => 'letsencrypt',
'callback' => [Text::class, 'boolean'],
],
'ad.id' => [
'label' => lng('domains.aliasdomainid'),
'field' => 'aliasdomainid'
],
], ],
'visible_columns' => Listing::getVisibleColumnsForListing('domain_list', [ 'visible_columns' => Listing::getVisibleColumnsForListing('domain_list', [
'd.domain_ace', 'd.domain_ace',

View File

@@ -41,7 +41,7 @@ return [
'm.destination' => [ 'm.destination' => [
'label' => lng('emails.forwarders'), 'label' => lng('emails.forwarders'),
'field' => 'destination', 'field' => 'destination',
// @todo formatting 'callback' => [Email::class, 'forwarderList'],
], ],
'm.popaccountid' => [ 'm.popaccountid' => [
'label' => lng('emails.account'), 'label' => lng('emails.account'),

View File

@@ -663,6 +663,7 @@ return [
'dkimenabled' => 'DKIM aktiviert', 'dkimenabled' => 'DKIM aktiviert',
'openbasedirenabled' => 'Openbasedir Einschränkung', 'openbasedirenabled' => 'Openbasedir Einschränkung',
'hsts' => 'HSTS aktiviert', 'hsts' => 'HSTS aktiviert',
'aliasdomainid' => 'ID der Alias-Domain',
], ],
'emails' => [ 'emails' => [
'description' => 'Hier können Sie Ihre E-Mail-Adressen einrichten.<br />Ein Konto ist wie Ihr Briefkasten vor der Haustür. Wenn jemand eine E-Mail an Sie schreibt, wird diese in dieses Konto gelegt.<br /><br />Die Zugangsdaten lauten wie folgt: (Die Angaben in <i>kursiver</i> Schrift sind durch die jeweiligen Einträge zu ersetzen)<br /><br />Hostname: <b><i>Domainname</i></b><br />Benutzername: <b><i>Kontoname / E-Mail-Adresse</i></b><br />Passwort: <b><i>das gewählte Passwort</i></b>', 'description' => 'Hier können Sie Ihre E-Mail-Adressen einrichten.<br />Ein Konto ist wie Ihr Briefkasten vor der Haustür. Wenn jemand eine E-Mail an Sie schreibt, wird diese in dieses Konto gelegt.<br /><br />Die Zugangsdaten lauten wie folgt: (Die Angaben in <i>kursiver</i> Schrift sind durch die jeweiligen Einträge zu ersetzen)<br /><br />Hostname: <b><i>Domainname</i></b><br />Benutzername: <b><i>Kontoname / E-Mail-Adresse</i></b><br />Passwort: <b><i>das gewählte Passwort</i></b>',

View File

@@ -975,6 +975,7 @@ return [
'dkimenabled' => 'DKIM enabled', 'dkimenabled' => 'DKIM enabled',
'openbasedirenabled' => 'Openbasedir restiction', 'openbasedirenabled' => 'Openbasedir restiction',
'hsts' => 'HSTS enabled', 'hsts' => 'HSTS enabled',
'aliasdomainid' => 'ID of alias domain',
], ],
'emails' => [ 'emails' => [
'description' => 'Here you can create and change your email addresses.<br />An account is like your letterbox in front of your house. If someone sends you an email, it will be dropped into the account.<br /><br />To download your emails use the following settings in your mailprogram: (The data in <i>italics</i> has to be changed to the equivalents you typed in!)<br />Hostname: <b><i>domainname</i></b><br />Username: <b><i>account name / e-mail address</i></b><br />password: <b><i>the password you\'ve chosen</i></b>', 'description' => 'Here you can create and change your email addresses.<br />An account is like your letterbox in front of your house. If someone sends you an email, it will be dropped into the account.<br /><br />To download your emails use the following settings in your mailprogram: (The data in <i>italics</i> has to be changed to the equivalents you typed in!)<br />Hostname: <b><i>domainname</i></b><br />Username: <b><i>account name / e-mail address</i></b><br />password: <b><i>the password you\'ve chosen</i></b>',