Bernd Wurst commited on 2018-02-20 11:35:39
Zeige 2 geänderte Dateien mit 41 Einfügungen und 19 Löschungen.
| ... | ... |
@@ -68,38 +68,50 @@ if (have_role(ROLE_CUSTOMER) && count($useraccounts) > 1) {
|
| 68 | 68 |
// Block Nutzung |
| 69 | 69 |
|
| 70 | 70 |
if ($is_current_user) {
|
| 71 |
- $used = false; |
|
| 72 | 71 |
output("<h4>Aktuelle Nutzung dieser Domain</h4>");
|
| 73 | 72 |
output('<div class="tile-container">');
|
| 74 |
- if (have_module('dns') && $dom->dns == 1 && dns_in_use($dom->id)) {
|
|
| 75 |
- output("<div class=\"tile usage\"><p><strong>".internal_link('../dns/dns_domain', "DNS-Server", 'dom='.$dom->id)."</strong></p><p>Manuelle DNS-Records vorhanden.</p></div>");
|
|
| 76 |
- $used = true; |
|
| 77 |
- } |
|
| 78 |
- if (have_module('email') && mail_in_use($dom->id)) {
|
|
| 73 |
+ $everused = false; |
|
| 74 |
+ if (have_module('dns') && $dom->dns == 1) {
|
|
| 75 |
+ $used = dns_in_use($dom->id); |
|
| 76 |
+ output("<div class=\"tile usage ".($used ? "used" : "unused")."\"><p><strong>".internal_link('../dns/dns_domain', "DNS-Server", 'dom='.$dom->id)."</strong></p><p>".($used ? "Manuelle DNS-Records vorhanden." : "DNS-Records möglich")."</p></div>");
|
|
| 77 |
+ $everused = true; |
|
| 78 |
+ } |
|
| 79 |
+ if (have_module('email') && ($dom->mail != 'none')) {
|
|
| 80 |
+ $used = mail_in_use($dom->id); |
|
| 79 | 81 |
$vmail = count_vmail($dom->id); |
| 82 |
+ if ($used) {
|
|
| 80 | 83 |
if ($vmail > 0) {
|
| 81 |
- output("<div class=\"tile\"><p><strong>".internal_link('../email/vmail', "E-Mail", 'filter='.$dom->fqdn)."</strong></p><p><strong>{$vmail}</strong> E-Mail-Postfächer unter dieser Domain</p></div>");
|
|
| 84 |
+ output("<div class=\"tile usage used\"><p><strong>".internal_link('../email/vmail', "E-Mail", 'filter='.$dom->fqdn)."</strong></p><p>E-Mail-Postfächer unter dieser Domain: <strong>{$vmail}</strong></p></div>");
|
|
| 82 | 85 |
} else {
|
| 83 |
- output("<div class=\"tile\"><p><strong>".internal_link('../email/imap', "E-Mail")."</strong></p><p>Manuelle Mail-Konfiguration ist aktiv</p></div>");
|
|
| 86 |
+ output("<div class=\"tile usage unused\"><p><strong>".internal_link('../email/imap', "E-Mail")."</strong></p><p>Manuelle Mail-Konfiguration ist aktiv</p></div>");
|
|
| 84 | 87 |
} |
| 85 |
- $used = true; |
|
| 88 |
+ } else {
|
|
| 89 |
+ output("<div class=\"tile usage unused\"><p><strong>".internal_link('../email/vmail', "E-Mail", 'filter='.$dom->fqdn)."</strong></p><p>Bisher keine E-Mail-Postfächer unter dieser Domain.</p></div>");
|
|
| 90 |
+ } |
|
| 91 |
+ $everused = true; |
|
| 86 | 92 |
} |
| 87 | 93 |
if (have_module('mailman') && mailman_subdomains($dom->id)) {
|
| 88 |
- output("<div class=\"tile\"><p><strong>".internal_link('../mailman/lists', "Mailinglisten")."</strong></p><p>Diese Domain wird für Mailinglisten verwendet</p></div>");
|
|
| 94 |
+ output("<div class=\"tile usage used\"><p><strong>".internal_link('../mailman/lists', "Mailinglisten")."</strong></p><p>Diese Domain wird für Mailinglisten verwendet</p></div>");
|
|
| 89 | 95 |
$used = true; |
| 96 |
+ $everused = true; |
|
| 90 | 97 |
} |
| 91 |
- if (have_module('vhosts') && web_in_use($dom->id)) {
|
|
| 92 |
- output("<div class=\"tile\"><p><strong>".internal_link('../vhosts/vhosts', "Websites", 'filter='.$dom->fqdn)."</strong></p><p>Es gibt Website-Einstellungen für diese Domain</p></div>");
|
|
| 93 |
- $used = true; |
|
| 98 |
+ if (have_module('vhosts')) {
|
|
| 99 |
+ $used = web_in_use($dom->id); |
|
| 100 |
+ output("<div class=\"tile usage ".($used ? "used" : "unused")."\"><p><strong>".internal_link('../vhosts/vhosts', "Websites", 'filter='.$dom->fqdn)."</strong></p><p>".($used ? "Es gibt Website-Einstellungen für diese Domain" : "Bisher keine Website eingerichtet")."</p></div>");
|
|
| 101 |
+ $everused = true; |
|
| 94 | 102 |
} |
| 95 |
- if (have_module('jabber') && $dom->jabber == 1) {
|
|
| 96 |
- output("<div class=\"tile\"><p><strong>".internal_link('../jabber/accounts', "Jabber/XMPP")."</strong></p><p>Diese Domain wird für Jabber verwendet</p></div>");
|
|
| 97 |
- $used = true; |
|
| 103 |
+ if (have_module('jabber')) {
|
|
| 104 |
+ if ($dom->jabber == 1) {
|
|
| 105 |
+ output("<div class=\"tile usage used\"><p><strong>".internal_link('../jabber/accounts', "Jabber/XMPP")."</strong></p><p>Diese Domain wird für Jabber verwendet</p></div>");
|
|
| 106 |
+ } else {
|
|
| 107 |
+ output("<div class=\"tile usage unused\"><p><strong>".internal_link('../jabber/new_domain', "Jabber/XMPP")."</strong></p><p>Diese Domain wird bisher nicht für Jabber verwendet</p></div>");
|
|
| 98 | 108 |
} |
| 99 |
- if (! $used) {
|
|
| 100 |
- output('<p><em>Aktuell wird diese Domain nicht verwendet!</em></p>');
|
|
| 109 |
+ $everused = true; |
|
| 101 | 110 |
} |
| 102 | 111 |
output('</div>');
|
| 112 |
+ if (! $everused) {
|
|
| 113 |
+ output('<p><em>Keine Nutzung dieser Domain (die hier angezeigt wird)</em></p>');
|
|
| 114 |
+ } |
|
| 103 | 115 |
} |
| 104 | 116 |
|
| 105 | 117 |
// Block Domain-Inhaber |
| ... | ... |
@@ -69,7 +69,17 @@ div#buttons {
|
| 69 | 69 |
display: none; |
| 70 | 70 |
} |
| 71 | 71 |
|
| 72 |
-div.tile,.usage {
|
|
| 72 |
+div.tile.usage {
|
|
| 73 | 73 |
width: 12em; |
| 74 | 74 |
} |
| 75 | 75 |
|
| 76 |
+div.tile.used {
|
|
| 77 |
+ border-color: #0a0; |
|
| 78 |
+ background-color: #dfd; |
|
| 79 |
+} |
|
| 80 |
+ |
|
| 81 |
+div.tile.unused {
|
|
| 82 |
+ color: #555; |
|
| 83 |
+ border-color: #555; |
|
| 84 |
+ background-color: #f5f5f5; |
|
| 85 |
+} |
|
| 76 | 86 |