67 lines
2.6 KiB
HTML
67 lines
2.6 KiB
HTML
## 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 _
|
|
%>
|
|
|
|
<%
|
|
show_explore_courses = settings.FEATURES.get('COURSES_ARE_BROWSABLE') and not show_program_listing
|
|
show_sysadmin_dashboard = settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff
|
|
self.real_user = getattr(user, 'real_user', user)
|
|
%>
|
|
|
|
<div class="nav-links">
|
|
<div class="main">
|
|
% if show_dashboard_tabs:
|
|
<div class="mobile-nav-item hidden-mobile nav-item nav-tab">
|
|
<a class="${'active ' if reverse('dashboard') == request.path else ''}tab-nav-link" href="${reverse('dashboard')}">
|
|
${_("Courses")}
|
|
</a>
|
|
</div>
|
|
% if show_program_listing:
|
|
<div class="mobile-nav-item hidden-mobile nav-item nav-tab">
|
|
<a class="${'active ' if reverse('program_listing_view') in request.path else ''}tab-nav-link" href="${reverse('program_listing_view')}">
|
|
${_("Programs")}
|
|
</a>
|
|
</div>
|
|
% endif
|
|
<div class="mobile-nav-item hidden-mobile nav-item nav-tab">
|
|
<a class="${'active ' if '/u/' in request.path else ''}tab-nav-link" href="${reverse('learner_profile', args=[self.real_user.username])}">
|
|
${_("Profile")}
|
|
</a>
|
|
</div>
|
|
% endif
|
|
% if show_explore_courses:
|
|
<div class="mobile-nav-item hidden-mobile nav-item nav-tab">
|
|
<a class="btn" href="${marketing_link('COURSES')}">${_('Discover New')}</a>
|
|
</div>
|
|
% endif
|
|
% if show_sysadmin_dashboard:
|
|
<div class="mobile-nav-item hidden-mobile nav-item">
|
|
## Translators: This is short for "System administration".
|
|
<a class="btn" href="${reverse('sysadmin')}">${_("Sysadmin")}</a>
|
|
</div>
|
|
% endif
|
|
</div>
|
|
<div class="secondary">
|
|
% 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
|
|
<div class="mobile-nav-item hidden-mobile nav-item">
|
|
<a class="shopping-cart" href="${reverse('shoppingcart.views.show_cart')}">
|
|
<span class="icon fa fa-shopping-cart" aria-hidden="true"></span> ${_("Shopping Cart")}
|
|
</a>
|
|
</div>
|
|
% endif
|
|
<div class="mobile-nav-item hidden-mobile nav-item">
|
|
<a class="help-link" href="${get_online_help_info(online_help_token)['doc_url']}" target="_blank">${_("Help")}</a>
|
|
</div>
|
|
<%include file="user_dropdown.html"/>
|
|
</div>
|
|
</div>
|
|
|
|
|