## mako
<%page expression_filter="h"/>
<%namespace name='static' file='static_content.html'/>

## This template should not use the target student's details when masquerading, see TNL-4895
<%
self.real_user = getattr(user, 'real_user', user)
%>

<%!
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _

from openedx.core.djangoapps.user_api.accounts.image_helpers import get_profile_image_urls_for_user
%>

<%
    profile_image_url = get_profile_image_urls_for_user(self.real_user)['medium']
    username = self.real_user.username
%>


<div class="nav-item hidden-mobile">
    <a href="${reverse('dashboard')}" class="menu-title">
        <img class="user-image-frame" src="${profile_image_url}" alt="">
        <span class="sr-only">${_("Dashboard for:")}</span>
        <span class="username">${username}</span>
    </a>
</div>
<div class="nav-item hidden-mobile nav-item-dropdown" tabindex="-1">
    <div class="toggle-user-dropdown" role="button" aria-label=${_("Options Menu")} aria-expanded="false" tabindex="0" aria-controls="user-menu">
        <span class="fa fa-caret-down" aria-hidden="true"></span>
    </div>
    <div class="dropdown-user-menu hidden" aria-label=${_("More Options")} role="menu" id="user-menu" tabindex="-1">
        <div class="dropdown-item dropdown-nav-item"><a href="${reverse('dashboard')}" role="menuitem">${_("Dashboard")}</a></div>
        <div class="mobile-nav-item dropdown-item dropdown-nav-item"><a href="${reverse('account_settings')}" role="menuitem">${_("Account")}</a></div>
        <div class="mobile-nav-item dropdown-item dropdown-nav-item"><a href="${reverse('logout')}" role="menuitem">${_("Sign Out")}</a></div>
    </div>
</div>
