## mako

<%page expression_filter="h" args="online_help_token"/>

<%namespace name='static' file='../static_content.html'/>
<%namespace file='../main.html' import="login_query"/>
<%!
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
%>

<ol class="left nav-global list-inline authenticated">
  <%block name="navigation_global_links_authenticated">
    % if settings.FEATURES.get('COURSES_ARE_BROWSABLE') and not show_program_listing:
      <li class="item nav-global-01">
        <a class="btn" href="${marketing_link('COURSES')}">${_('Explore courses')}</a>
      </li>
    % endif
    % if show_program_listing:
      <li class="tab-nav-item">
        <a class="${'active ' if reverse('dashboard') == request.path else ''}tab-nav-link" href="${reverse('dashboard')}">
          ${_("Courses")}
        </a>
      </li>
      <li class="tab-nav-item">
        <a class="${'active ' if reverse('program_listing_view') in request.path else ''}tab-nav-link" href="${reverse('program_listing_view')}">
          ${_("Programs")}
        </a>
      </li>
    % endif
    % if settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff:
      <li class="item">
        ## Translators: This is short for "System administration".
        <a class="btn" href="${reverse('sysadmin')}">${_("Sysadmin")}</a>
      </li>
    % endif
  </%block>
</ol>

<%include file="../user_dropdown.html"/>

<a href="${get_online_help_info(online_help_token)['doc_url']}"
         target="_blank"
         class="doc-link">${_("Help")}</a>

% if should_display_shopping_cart_func() and not (course and static.is_request_in_themed_site()): # see shoppingcart.context_processor.user_has_cart_context_processor
  <ol class="user">
    <li class="primary">
      <a class="shopping-cart" href="${reverse('shoppingcart.views.show_cart')}">
        <span class="icon fa fa-shopping-cart" aria-hidden="true"></span> ${_("Shopping Cart")}
      </a>
    </li>
  </ol>
% endif
