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

View File

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