Revert "displayed nextcloud user menu like moodle and wp applications"

This reverts commit 5d5ef2f884.
main
elena 2023-04-12 09:35:58 +00:00 committed by Antoni Bertran
parent d4796c0a73
commit faf3180205
1 changed files with 17 additions and 36 deletions

View File

@ -22,7 +22,6 @@
*/ */
$api_url = "https://" . preg_replace('/^nextcloud\./', 'api.', $_SERVER['HTTP_HOST']); $api_url = "https://" . preg_replace('/^nextcloud\./', 'api.', $_SERVER['HTTP_HOST']);
$avatar_url = "https://" . preg_replace('/^nextcloud\./', 'sso.', $_SERVER['HTTP_HOST']) . "/auth/realms/master/avatar-provider"; $avatar_url = "https://" . preg_replace('/^nextcloud\./', 'sso.', $_SERVER['HTTP_HOST']) . "/auth/realms/master/avatar-provider";
$profile_url = "https://" . preg_replace('/^nextcloud\./', 'sso.', $_SERVER['HTTP_HOST']) . "/auth/realms/master/account";
// Remove user menu Settings item for non-administrator users // Remove user menu Settings item for non-administrator users
if(!array_key_exists('core_apps', $_["settingsnavigation"])){ if(!array_key_exists('core_apps', $_["settingsnavigation"])){
@ -68,25 +67,16 @@
.newFileMenu > ul:nth-child(1) > li:nth-child(3) { .newFileMenu > ul:nth-child(1) > li:nth-child(3) {
order: 1; order: 1;
} }
#header .header-right>div>.menu:after { #header .header-right > div > .menu.settings-menu > ul li.onlytext {
display:none; display: inline-flex;
} align-items: center;
.ddicon { height: 44px;
color: var(--color-main-text);
padding: 10px 35px;
box-sizing: border-box;
white-space: nowrap;
position: relative; position: relative;
left: 8px; width: 100%;
top: 9px;
}
.ddiconcontainer {
margin-right: 16px;
width: 36px;
height: 36px;
background-color: #f0f0f0;
position: relative;
border-radius: 5px;
left: -7px;
}
#expanddiv {
padding: .5rem .7rem;
} }
</style> </style>
</head> </head>
@ -144,25 +134,16 @@
<nav class="settings-menu" id="expanddiv" style="display:none;" <nav class="settings-menu" id="expanddiv" style="display:none;"
aria-label="<?php p($l->t('Settings menu'));?>"> aria-label="<?php p($l->t('Settings menu'));?>">
<ul> <ul>
<li> <li class="onlytext"><?php p($_['user_displayname']); ?></li>
<a target="_blank" href="<?php p($profile_url)?>">
<div class="ddiconcontainer">
<i class="icon fa fa-user fa-fw ddicon"></i>
</div>
<?php p($_['user_displayname']); ?>
</a>
</li>
<?php foreach ($_['settingsnavigation'] as $entry):?> <?php foreach ($_['settingsnavigation'] as $entry):?>
<?php if ($entry['id'] == 'logout') { ?> <li data-id="<?php p($entry['id']); ?>">
<li data-id="<?php p($entry['id']); ?>"> <a href="<?php print_unescaped($entry['href']); ?>"
<a href="<?php print_unescaped($entry['href']); ?>"> <?php if ($entry["active"]): ?> class="active"<?php endif; ?>>
<div class="ddiconcontainer"> <img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>">
<i class="icon fa fa-sign-out fa-fw ddicon" aria-hidden="true"></i> </div> <?php p($entry['name']) ?>
<?php p($entry['name']) ?> </a>
</a>
</li> </li>
<?php } ?> <?php endforeach; ?>
<?php endforeach; ?>
</ul> </ul>
</nav> </nav>
</div> </div>