Browse Source

Simplify inline alerts code (#3719)

* Simplify inline alerts code

* Tidy

* Apply some Prettier formatting to list pages

* Prevent wrapping in Disk and Bandwidth cells

* Fix .badge text alignment in some cases

* Improve List Users email output
Alec Rust 2 years ago
parent
commit
9bac1d6224

+ 2 - 2
web/add/db/index.php

@@ -201,12 +201,12 @@ if (!empty($_POST["ok"])) {
 				htmlentities($user_plain) . "_" . htmlentities($_POST["v_database"]),
 			),
 			"</a>",
-			'<a class="u-text-bold" href="/edit/db/?database=' .
+			'<a href="/edit/db/?database=' .
 				htmlentities($user_plain) .
 				"_" .
 				htmlentities($_POST["v_database"]) .
 				'">',
-			'<a class="u-text-bold" href="' . $db_admin_link . '" target="_blank">',
+			'<a href="' . $db_admin_link . '" target="_blank">',
 		);
 		unset($v_database);
 		unset($v_dbuser);

+ 3 - 5
web/add/dns/index.php

@@ -200,9 +200,7 @@ if (!empty($_POST["ok"])) {
 				htmlentities($_POST["v_domain"]),
 			),
 			"</a>",
-			'<a class="u-text-bold" href="/edit/dns/?domain=' .
-				htmlentities($_POST["v_domain"]) .
-				'">',
+			'<a href="/edit/dns/?domain=' . htmlentities($_POST["v_domain"]) . '">',
 		);
 
 		unset($v_domain);
@@ -283,8 +281,8 @@ if (!empty($_POST["ok_rec"])) {
 				htmlentities($_POST["v_rec"]),
 				htmlentities($_POST["v_domain"]),
 			),
-			"</span>",
-			"<span class='u-text-bold'>",
+			"</code>",
+			"<code>",
 		);
 		unset($v_domain);
 		unset($v_rec);

+ 1 - 1
web/add/ip/index.php

@@ -94,7 +94,7 @@ if (!empty($_POST["ok"])) {
 				htmlentities($_POST["v_ip"]),
 			),
 			"</a>",
-			'<a class="u-text-bold" href="/edit/ip/?ip=' . htmlentities($_POST["v_ip"]) . '">',
+			'<a href="/edit/ip/?ip=' . htmlentities($_POST["v_ip"]) . '">',
 		);
 		unset($v_ip);
 		unset($v_netmask);

+ 2 - 4
web/add/mail/index.php

@@ -190,9 +190,7 @@ if (!empty($_POST["ok"])) {
 				htmlentities($_POST["v_domain"]),
 			),
 			"</a>",
-			'<a class="u-text-bold" href="/list/mail/?domain=' .
-				htmlentities($_POST["v_domain"]) .
-				'">',
+			'<a href="/list/mail/?domain=' . htmlentities($_POST["v_domain"]) . '">',
 		);
 		unset($v_domain, $v_webmail);
 	}
@@ -512,7 +510,7 @@ if (!empty($_POST["ok_acc"])) {
 				htmlentities($_POST["v_domain"]),
 			),
 			"</a>",
-			'<a class="u-text-bold" href="/edit/mail/?account=' .
+			'<a href="/edit/mail/?account=' .
 				htmlentities(strtolower($_POST["v_account"])) .
 				"&domain=" .
 				htmlentities($_POST["v_domain"]) .

+ 1 - 3
web/add/package/index.php

@@ -203,9 +203,7 @@ if (!empty($_POST["ok"])) {
 				htmlentities($_POST["v_package"]),
 			),
 			"</a>",
-			'<a class="u-text-bold" href="/edit/package/?package=' .
-				htmlentities($_POST["v_package"]) .
-				'">',
+			'<a href="/edit/package/?package=' . htmlentities($_POST["v_package"]) . '">',
 		);
 		unset($v_package);
 	}

+ 2 - 4
web/add/user/index.php

@@ -229,10 +229,8 @@ if (!empty($_POST["ok"])) {
 				htmlentities($_POST["v_username"]),
 			),
 			"</a>",
-			'<a class="u-text-bold" href="/edit/user/?user=' .
-				htmlentities($_POST["v_username"]) .
-				'">',
-			'<a class="u-text-bold" href="/login/?loginas=' .
+			'<a href="/edit/user/?user=' . htmlentities($_POST["v_username"]) . '">',
+			'<a href="/login/?loginas=' .
 				htmlentities($_POST["v_username"]) .
 				"&token=" .
 				htmlentities($_SESSION["token"]) .

+ 1 - 1
web/add/web/index.php

@@ -127,7 +127,7 @@ if (!empty($_POST["ok"])) {
 		$_SESSION["ok_msg"] = htmlify_trans(
 			sprintf(_("Domain {%s} has been created successfully."), htmlentities($v_domain)),
 			"</a>",
-			'<a class="u-text-bold" href="/edit/web/?domain=' . htmlentities($v_domain) . '">',
+			'<a href="/edit/web/?domain=' . htmlentities($v_domain) . '">',
 		);
 		unset($v_domain);
 		unset($v_aliases);

+ 1 - 0
web/css/src/themes/default.css

@@ -2122,6 +2122,7 @@
 	color: #6c6c6c;
 	padding-left: 4px;
 	padding-right: 4px;
+	text-align: center;
 	text-shadow: 0 1px #fafafa;
 	border: 1px solid #b8b8b8;
 	background-color: #eaeaea;

+ 4 - 0
web/css/src/utilities.css

@@ -139,6 +139,10 @@
 	min-height: 600px !important;
 }
 
+.u-max-width250 {
+	max-width: 250px !important;
+}
+
 .u-max-width300 {
 	max-width: 300px !important;
 }

+ 1 - 1
web/templates/pages/list_access_keys.php

@@ -73,7 +73,7 @@
 			<div class="units-table-row animate__animated animate__fadeIn js-unit"
 				data-sort-key="<?= strtolower($key) ?>"
 				data-sort-comment="<?= strtolower($key_comment) ?>"
-				data-sort-date="<?= strtotime($data[$key]['DATE'] .' '. $data[$key]['TIME'] ) ?>">
+				data-sort-date="<?= strtotime($data[$key]["DATE"] . " " . $data[$key]["TIME"]) ?>">
 				<div class="units-table-cell">
 					<div>
 						<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="key[]" value="<?= $key ?>">

+ 4 - 4
web/templates/pages/list_cron.php

@@ -117,19 +117,19 @@
 					<?php if ($read_only === "true" || $data[$key]["SUSPENDED"] == "yes") { ?>
 						<?= htmlspecialchars($data[$key]["CMD"], ENT_NOQUOTES) ?>
 					<?php } else { ?>
-						<a href="/edit/cron/?job=<?= $data[$key]['JOB'] ?>&token=<?= $_SESSION['token'] ?>" title="<?= _("Edit Cron Job") ?>: <?= htmlspecialchars($data[$key]['CMD'], ENT_NOQUOTES) ?>">
-							<?= htmlspecialchars($data[$key]['CMD'], ENT_NOQUOTES) ?>
+						<a href="/edit/cron/?job=<?= $data[$key]["JOB"] ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Edit Cron Job") ?>: <?= htmlspecialchars($data[$key]["CMD"], ENT_NOQUOTES) ?>">
+							<?= htmlspecialchars($data[$key]["CMD"], ENT_NOQUOTES) ?>
 						</a>
 					<?php } ?>
 				</div>
 				<div class="units-table-cell">
 					<?php if (!$read_only) { ?>
 						<ul class="units-table-row-actions">
-							<?php if ($data[$key]['SUSPENDED'] == 'no') { ?>
+							<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
 								<li class="units-table-row-action shortcut-enter" data-key-action="href">
 									<a
 										class="units-table-row-action-link"
-										href="/edit/cron/?job=<?= $data[$key]['JOB'] ?>&token=<?= $_SESSION['token'] ?>"
+										href="/edit/cron/?job=<?= $data[$key]["JOB"] ?>&token=<?= $_SESSION["token"] ?>"
 										title="<?= _("Edit") ?>"
 									>
 										<i class="fas fa-pencil icon-orange"></i>

+ 4 - 4
web/templates/pages/list_dns_rec.php

@@ -123,11 +123,11 @@
 					<?php if ($read_only !== "true") { ?>
 						<ul class="units-table-row-actions">
 							<?php if ($read_only !== "true") { ?>
-								<?php if ($data[$key]['SUSPENDED'] == 'no') { ?>
+								<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
 									<li class="units-table-row-action shortcut-enter" data-key-action="href">
 										<a
 											class="units-table-row-action-link"
-											href="/edit/dns/?domain=<?= htmlspecialchars($_GET['domain']) ?>&record_id=<?= $data[$key]['ID'] ?>&token=<?= $_SESSION['token'] ?>"
+											href="/edit/dns/?domain=<?= htmlspecialchars($_GET["domain"]) ?>&record_id=<?= $data[$key]["ID"] ?>&token=<?= $_SESSION["token"] ?>"
 											title="<?= _("Edit DNS Record") ?>"
 										>
 											<i class="fas fa-pencil icon-orange"></i>
@@ -153,11 +153,11 @@
 				</div>
 				<div class="units-table-cell u-text-bold u-text-center-desktop">
 					<span class="u-hide-desktop"><?= _("Type") ?>:</span>
-					<?= $data[$key]['TYPE'] ?>
+					<?= $data[$key]["TYPE"] ?>
 				</div>
 				<div class="units-table-cell u-text-center-desktop">
 					<span class="u-hide-desktop u-text-bold"><?= _("Priority") ?>:</span>
-					<?= $data[$key]['PRIORITY'] ?>
+					<?= $data[$key]["PRIORITY"] ?>
 				</div>
 				<div class="units-table-cell u-text-center-desktop">
 					<span class="u-hide-desktop u-text-bold"><?= _("TTL") ?>:</span>

+ 4 - 4
web/templates/pages/list_firewall.php

@@ -124,7 +124,7 @@
 						<li class="units-table-row-action shortcut-enter" data-key-action="href">
 							<a
 								class="units-table-row-action-link"
-								href="/edit/firewall/?rule=<?= $key ?>&token=<?= $_SESSION['token'] ?>"
+								href="/edit/firewall/?rule=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
 								title="<?= _("Edit Firewall Rule") ?>"
 							>
 								<i class="fas fa-pencil icon-orange"></i>
@@ -163,15 +163,15 @@
 				</div>
 				<div class="units-table-cell u-text-center-desktop">
 					<span class="u-hide-desktop u-text-bold"><?= _("Protocol") ?>:</span>
-					<?= _($data[$key]['PROTOCOL']) ?>
+					<?= _($data[$key]["PROTOCOL"]) ?>
 				</div>
 				<div class="units-table-cell u-text-bold u-text-center-desktop">
 					<span class="u-hide-desktop"><?= _("Port") ?>:</span>
-					<?= $data[$key]['PORT'] ?>
+					<?= $data[$key]["PORT"] ?>
 				</div>
 				<div class="units-table-cell u-text-center-desktop">
 					<span class="u-hide-desktop u-text-bold"><?= _("IP Address") ?>:</span>
-					<?= $data[$key]['IP'] ?>
+					<?= $data[$key]["IP"] ?>
 				</div>
 			</div>
 		<?php } ?>

+ 1 - 1
web/templates/pages/list_ip.php

@@ -101,7 +101,7 @@
 						<li class="units-table-row-action shortcut-enter" data-key-action="href">
 							<a
 								class="units-table-row-action-link"
-								href="/edit/ip/?ip=<?= $key ?>&token=<?= $_SESSION['token'] ?>"
+								href="/edit/ip/?ip=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
 								title="<?= _("Edit IP Address") ?>"
 							>
 								<i class="fas fa-pencil icon-orange"></i>

+ 24 - 24
web/templates/pages/list_mail.php

@@ -31,12 +31,12 @@
 						<span class="name <?php if ($_SESSION['userSortOrder'] === 'name') { echo 'active'; } ?>"><?= _("Name") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span>
 					</li>
 				</ul>
-				<?php if ($read_only !== 'true') { ?>
+				<?php if ($read_only !== "true") { ?>
 					<form x-data x-bind="BulkEdit" action="/bulk/mail/" method="post">
-						<input type="hidden" name="token" value="<?= $_SESSION['token'] ?>">
+						<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
 						<select class="form-select" name="action">
 							<option value=""><?= _("Apply to selected") ?></option>
-							<?php if ($_SESSION['userContext'] === 'admin') { ?>
+							<?php if ($_SESSION["userContext"] === "admin") { ?>
 								<option value="rebuild"><?= _("Rebuild All") ?></option>
 							<?php } ?>
 							<option value="suspend"><?= _("Suspend") ?></option>
@@ -167,8 +167,8 @@
 			<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> animate__animated animate__fadeIn js-unit"
 				data-sort-date="<?= strtotime($data[$key]['DATE'].' '.$data[$key]['TIME']) ?>"
 				data-sort-name="<?= $key ?>"
-				data-sort-disk="<?= $data[$key]['U_DISK'] ?>"
-				data-sort-accounts="<?= $data[$key]['ACCOUNTS'] ?>">
+				data-sort-disk="<?= $data[$key]["U_DISK"] ?>"
+				data-sort-accounts="<?= $data[$key]["ACCOUNTS"] ?>">
 				<div class="units-table-cell">
 					<div>
 						<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="domain[]" value="<?= $key ?>" <?= $display_mode ?>>
@@ -177,17 +177,17 @@
 				</div>
 				<div class="units-table-cell units-table-heading-cell u-text-bold">
 					<span class="u-hide-desktop"><?= _("Name") ?>:</span>
-					<a href="?domain=<?= $key ?>&token=<?= $_SESSION['token'] ?>" title="<?= _("Mail Accounts") ?>: <?= $key ?>">
+					<a href="?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Mail Accounts") ?>: <?= $key ?>">
 						<?= $key ?>
 					</a>
 				</div>
 				<div class="units-table-cell">
 					<ul class="units-table-row-actions">
-						<?php if ($read_only === 'true') { ?>
+						<?php if ($read_only === "true") { ?>
 							<li class="units-table-row-action shortcut-l" data-key-action="href">
 								<a
 									class="units-table-row-action-link"
-									href="?domain=<?= $key ?>&token=<?= $_SESSION['token'] ?>"
+									href="?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
 									title="<?= _("Mail Accounts") ?>"
 								>
 									<i class="fas fa-users icon-blue"></i>
@@ -197,18 +197,18 @@
 							<li class="units-table-row-action shortcut-l" data-key-action="href">
 								<a
 									class="units-table-row-action-link"
-									href="?domain=<?= $key ?>&dns=1&token=<?= $_SESSION['token'] ?>"
+									href="?domain=<?= $key ?>&dns=1&token=<?= $_SESSION["token"] ?>"
 									title="<?= _("DNS Records") ?>"
 								>
 									<i class="fas fa-book-atlas icon-blue"></i>
 									<span class="u-hide-desktop"><?= _("DNS Records") ?></span>
 								</a>
 							</li>
-							<?php if ($data[$key]['SUSPENDED'] == 'no') { ?>
+							<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
 								<li class="units-table-row-action" data-key-action="href">
 									<a
 										class="units-table-row-action-link"
-										href="http://<?= $webmail;?>.<?= $key ?>/"
+										href="http://<?= $webmail ?>.<?= $key ?>/"
 										target="_blank"
 										title="<?= _("Open Webmail") ?>"
 									>
@@ -218,23 +218,23 @@
 								</li>
 							<?php } ?>
 						<?php } else { ?>
-							<?php if ($data[$key]['SUSPENDED'] == 'no') { ?>
+							<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
 								<li class="units-table-row-action shortcut-n" data-key-action="href">
 									<a
 										class="units-table-row-action-link"
-										href="/add/mail/?domain=<?= $key ?>&token=<?= $_SESSION['token'] ?>"
+										href="/add/mail/?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
 										title="<?= _("Add Mail Account") ?>"
 									>
 										<i class="fas fa-circle-plus icon-green"></i>
 										<span class="u-hide-desktop"><?= _("Add Mail Account") ?></span>
 									</a>
 								</li>
-								<?php if ($_SESSION['WEBMAIL_SYSTEM']) { ?>
-									<?php if (!empty($data[$key]['WEBMAIL'])) { ?>
+								<?php if ($_SESSION["WEBMAIL_SYSTEM"]) { ?>
+									<?php if (!empty($data[$key]["WEBMAIL"])) { ?>
 										<li class="units-table-row-action" data-key-action="href">
 											<a
 												class="units-table-row-action-link"
-												href="http://<?= $webmail;?>.<?= $key ?>/"
+												href="http://<?= $webmail ?>.<?= $key ?>/"
 												target="_blank"
 												title="<?= _("Open Webmail") ?>"
 											>
@@ -247,7 +247,7 @@
 								<li class="units-table-row-action shortcut-enter" data-key-action="href">
 									<a
 										class="units-table-row-action-link"
-										href="/edit/mail/?domain=<?= $key ?>&token=<?= $_SESSION['token'] ?>"
+										href="/edit/mail/?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
 										title="<?= _("Edit Mail Domain") ?>"
 									>
 										<i class="fas fa-pencil icon-orange"></i>
@@ -258,7 +258,7 @@
 							<li class="units-table-row-action shortcut-l" data-key-action="href">
 								<a
 									class="units-table-row-action-link"
-									href="?domain=<?= $key ?>&dns=1&token=<?= $_SESSION['token'] ?>"
+									href="?domain=<?= $key ?>&dns=1&token=<?= $_SESSION["token"] ?>"
 									title="<?= _("DNS Records") ?>"
 								>
 									<i class="fas fa-book-atlas icon-blue"></i>
@@ -268,7 +268,7 @@
 							<li class="units-table-row-action shortcut-s" data-key-action="js">
 								<a
 									class="units-table-row-action-link data-controls js-confirm-action"
-									href="/<?= $spnd_action ?>/mail/?domain=<?= $key ?>&token=<?= $_SESSION['token'] ?>"
+									href="/<?= $spnd_action ?>/mail/?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
 									title="<?= $spnd_action_title ?>"
 									data-confirm-title="<?= $spnd_action_title ?>"
 									data-confirm-message="<?= sprintf($spnd_confirmation, $key) ?>"
@@ -280,10 +280,10 @@
 							<li class="units-table-row-action shortcut-delete" data-key-action="js">
 								<a
 									class="units-table-row-action-link data-controls js-confirm-action"
-									href="/delete/mail/?domain=<?= $key ?>&token=<?= $_SESSION['token'] ?>"
+									href="/delete/mail/?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
 									title="<?= _("Delete") ?>"
 									data-confirm-title="<?= _("Delete") ?>"
-									data-confirm-message="<?= sprintf(_('Are you sure you want to delete domain %s?'), $key) ?>"
+									data-confirm-message="<?= sprintf(_("Are you sure you want to delete domain %s?"), $key) ?>"
 								>
 									<i class="fas fa-trash icon-red"></i>
 									<span class="u-hide-desktop"><?= _("Delete") ?></span>
@@ -306,10 +306,10 @@
 				<div class="units-table-cell u-text-center-desktop">
 					<span class="u-hide-desktop u-text-bold"><?= _("Disk") ?>:</span>
 					<span class="u-text-bold">
-						<?= humanize_usage_size($data[$key]['U_DISK']) ?>
+						<?= humanize_usage_size($data[$key]["U_DISK"]) ?>
 					</span>
 					<span class="u-text-small">
-						<?= humanize_usage_measure($data[$key]['U_DISK']) ?>
+						<?= humanize_usage_measure($data[$key]["U_DISK"]) ?>
 					</span>
 				</div>
 				<div class="units-table-cell u-text-center-desktop">
@@ -337,7 +337,7 @@
 <footer class="app-footer">
 	<div class="container app-footer-inner">
 		<p>
-			<?php printf(ngettext('%d mail domain', '%d mail domains', $i),$i); ?>
+			<?php printf(ngettext("%d mail domain", "%d mail domains", $i), $i); ?>
 		</p>
 	</div>
 </footer>

+ 2 - 2
web/templates/pages/list_mail_acc.php

@@ -156,8 +156,8 @@ if (!empty($_SESSION["WEBMAIL_ALIAS"])) {
 			<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> animate__animated animate__fadeIn js-unit"
 				data-sort-date="<?= strtotime($data[$key]['DATE'].' '.$data[$key]['TIME']) ?>"
 				data-sort-name="<?= $key ?>"
-				data-sort-disk="<?= $data[$key]['U_DISK'] ?>"
-				data-sort-quota="<?= $data[$key]['QUOTA'] ?>">
+				data-sort-disk="<?= $data[$key]["U_DISK"] ?>"
+				data-sort-quota="<?= $data[$key]["QUOTA"] ?>">
 				<div class="units-table-cell">
 					<div>
 						<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="account[]" value="<?= $key ?>" <?= $display_mode ?>>

+ 2 - 2
web/templates/pages/list_packages.php

@@ -135,7 +135,7 @@
 							<li class="units-table-row-action shortcut-enter" data-key-action="href">
 								<a
 									class="units-table-row-action-link"
-									href="/edit/package/?package=<?= $key ?>&token=<?= $_SESSION['token'] ?>"
+									href="/edit/package/?package=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
 									title="<?= _("Edit Package") ?>"
 								>
 									<i class="fas fa-pencil icon-orange"></i>
@@ -146,7 +146,7 @@
 						<li class="units-table-row-action" data-key-action="href">
 							<a
 								class="units-table-row-action-link"
-								href="/copy/package/?package=<?= $key ?>&token=<?= $_SESSION['token'] ?>"
+								href="/copy/package/?package=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
 								title="<?= _("Duplicate") ?>"
 							>
 								<i class="fas fa-clone icon-teal"></i>

+ 6 - 6
web/templates/pages/list_search.php

@@ -84,7 +84,7 @@
 				data-sort-date="<?= strtotime($value['DATE'].' '.$value['TIME']) ?>"
 				data-sort-name="<?= $value['RESULT'] ?>"
 				data-sort-type="<?= _($object) ?>"
-				data-sort-owner="<?= $value['USER'] ?>"
+				data-sort-owner="<?= $value["USER"] ?>"
 				data-sort-status="<?= $status ?>"
 				style="<?php if (($_SESSION['POLICY_SYSTEM_HIDE_ADMIN'] === 'yes') && ($value['USER']) === 'admin') { echo 'display: none;'; } ?>">
 				<div class="units-table-cell u-text-center-desktop">
@@ -159,13 +159,13 @@
 				</div>
 				<div class="units-table-cell u-text-bold u-text-center-desktop">
 					<span class="u-hide-desktop"><?= _("Owner") ?>:</span>
-					<a href="/search/?q=<?= htmlentities($_GET['q']); ?>&u=<?= $value['USER']; ?>&token=<?= $_SESSION['token'] ?>">
-						<?= $value['USER']; ?>
+					<a href="/search/?q=<?= htmlentities($_GET["q"]) ?>&u=<?= $value["USER"] ?>&token=<?= $_SESSION["token"] ?>">
+						<?= $value["USER"] ?>
 					</a>
-					<?php if (!($_SESSION['POLICY_SYSTEM_HIDE_ADMIN'] === 'yes' && $value['USER'] !== 'admin') && ($_SESSION['userContext'] === 'admin')) { ?>
-						<a href="/login/?loginas=<?= $value['USER'] ?>&token=<?= $_SESSION['token'] ?>" title="<?= _("Log in as") ?> <?= $value['USER'] ?>">
+					<?php if (!($_SESSION["POLICY_SYSTEM_HIDE_ADMIN"] === "yes" && $value["USER"] !== "admin") && $_SESSION["userContext"] === "admin") { ?>
+						<a href="/login/?loginas=<?= $value["USER"] ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Log in as") ?> <?= $value["USER"] ?>">
 							<i class="fas fa-right-to-bracket icon-green icon-dim"></i>
-							<span class="u-hidden-visually"><?= _("Log in as") ?> <?= $value['USER'] ?></span>
+							<span class="u-hidden-visually"><?= _("Log in as") ?> <?= $value["USER"] ?></span>
 						</a>
 					<?php } ?>
 				</div>

+ 3 - 3
web/templates/pages/list_services.php

@@ -142,10 +142,10 @@
 						<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
 					</div>
 				</div>
-				<div class="units-table-cell units-table-heading-cell">
-					<span class="u-hide-desktop u-text-bold"><?= _("Service") ?>:</span>
+				<div class="units-table-cell units-table-heading-cell u-text-bold">
+					<span class="u-hide-desktop"><?= _("Service") ?>:</span>
 					<i class="fas <?= $state_icon ?> u-mr5"></i>
-					<a class="u-text-bold" href="/edit/server/<? echo $edit_url ?>/" title="<?= _("Edit") ?>: <?= $key ?>">
+					<a href="/edit/server/<? echo $edit_url ?>/" title="<?= _("Edit") ?>: <?= $key ?>">
 						<?= $key ?>
 					</a>
 				</div>

+ 5 - 5
web/templates/pages/list_user.php

@@ -158,9 +158,9 @@
 							(<?= $data[$key]["NAME"] ?>)
 						</a>
 					<?php } ?>
-					<p>
-						<span class="u-text-bold"><?= _("Email") ?>:</span>
-						<?= $data[$key]["CONTACT"] ?>
+					<p class="u-max-width250 u-text-truncate">
+						<span class="u-hide-desktop"><?= _("Email") ?>:</span>
+						<span title="<?= $data[$key]["CONTACT"] ?>"><?= $data[$key]["CONTACT"] ?></span>
 					</p>
 				</div>
 				<div class="units-table-cell">
@@ -236,7 +236,7 @@
 					<span class="u-hide-desktop u-text-bold"><?= _("IPs") ?>:</span>
 					<?= $data[$key]["IP_OWNED"] ?>
 				</div>
-				<div class="units-table-cell u-text-center-desktop">
+				<div class="units-table-cell u-text-center-desktop u-text-no-wrap">
 					<span class="u-hide-desktop u-text-bold"><?= _("Disk") ?>:</span>
 					<span class="u-text-bold">
 						<?= humanize_usage_size($data[$key]["U_DISK"], 1) ?>
@@ -251,7 +251,7 @@
 						<?= humanize_usage_measure($data[$key]["DISK_QUOTA"]) ?>
 					</span>
 				</div>
-				<div class="units-table-cell u-text-center-desktop">
+				<div class="units-table-cell u-text-center-desktop u-text-no-wrap">
 					<span class="u-hide-desktop u-text-bold"><?= _("Bandwidth") ?>:</span>
 					<span class="u-text-bold">
 						<?= humanize_usage_size($data[$key]["U_BANDWIDTH"], 1) ?>