Selaa lähdekoodia

Add user header and domain icon to menu.php (#6160)

AlexC 3 vuotta sitten
vanhempi
commit
fe097f62e5
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      resources/classes/menu.php

+ 7 - 1
resources/classes/menu.php

@@ -1042,10 +1042,16 @@ if (!class_exists('menu')) {
 				$html .= "			</ul>\n";
 
 				$html .= "			<ul class='navbar-nav ml-auto'>\n";
+				//current user
+					if ($_SESSION['theme']['user_visible']['text'] == 'true') {
+						$html .= "		<li class='nav-item'>\n";
+						$html .= "			<a class='header_user' href='".PROJECT_PATH."/core/users/user_edit.php?id=user' title=\"".$this->text['theme-label-user']."\"><i class='fas fa-".($_SESSION['theme']['body_header_icon_user']['text'] != '' ? $_SESSION['theme']['body_header_icon_user']['text'] : 'user-circle')." fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".$_SESSION['username']."</a>";
+						$html .= "		</li>\n";
+					}
 				//domain name/selector
 					if (isset($_SESSION['username']) && $_SESSION['username'] != '' && permission_exists('domain_select') && count($_SESSION['domains']) > 1 && $_SESSION['theme']['domain_visible']['text'] == 'true') {
 						$html .= "		<li class='nav-item'>\n";
-						$html .= "			<a class='nav-link domain_selector_domain' href='#' title='".$this->text['theme-label-open_selector']."'>".escape($_SESSION['domain_name'])."</a>";
+						$html .= "			<a class='header_domain' href='#' id='header_domain_selector_domain' title='".$this->text['theme-label-open_selector']."'><i class='fas fa-".($_SESSION['theme']['body_header_icon_domain']['text'] != '' ? $_SESSION['theme']['body_header_icon_domain']['text'] : 'globe-americas')." fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".escape($_SESSION['domain_name'])."</a>";
 						$html .= "		</li>\n";
 					}
 				//logout icon