show server profile in header

This commit is contained in:
Roland Gruber 2019-05-12 10:13:09 +02:00
parent 99da1f05e6
commit 54b68e7765
2 changed files with 26 additions and 4 deletions

View File

@ -99,16 +99,33 @@ foreach ($toSort as $key => $value) {
</span> </span>
</a> </a>
</td> </td>
<td align="left" height="30" class="nowrap"> <td align="left" height="30" class="nowrap header-user-label">
<span class="hide-on-mobile">
<?php <?php
$userData = $_SESSION['ldap']->decrypt_login(); $userData = $_SESSION['ldap']->decrypt_login();
$userName = extractRDNValue($userData[0]);
?>
<span class="hide-on-mobile">
<?php
echo '&nbsp;&nbsp;<small title="' . $userData[0] . '">'; echo '&nbsp;&nbsp;<small title="' . $userData[0] . '">';
printf('(' . _('Logged in as: %s') . ')', extractRDNValue($userData[0])); $serverProfileLabel = $_SESSION['config']->getName() . ' - ';
$userData = null; $serverProfileNames = getConfigProfiles();
if (sizeof($serverProfileNames) < 2) {
$serverProfileLabel = '';
}
echo '(' . $serverProfileLabel . $userName . ')';
echo '</small>'; echo '</small>';
?> ?>
</span> </span>
<span class="hide-on-tablet">
<?php
echo '&nbsp;&nbsp;<small title="' . $userData[0] . '">';
echo $userName;
echo '</small>';
?>
</span>
<?php
$userData = null;
?>
</td> </td>
<td align="right" height=30 width="100%"> <td align="right" height=30 width="100%">
<ul id="dropmenu" class="dropmenu"> <ul id="dropmenu" class="dropmenu">

View File

@ -162,6 +162,11 @@ table.responsive-table td {
width: 100%; width: 100%;
} }
.header-user-label {
max-width: 100px;
overflow: hidden;
}
} }
/* tablet */ /* tablet */