## 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 list-inline nav-global">
  <%block name="navigation_global_links">
    % if static.get_value('ENABLE_MKTG_SITE', settings.FEATURES.get('ENABLE_MKTG_SITE', False)):
      <li class="item nav-global-01">
        <a href="${marketing_link('HOW_IT_WORKS')}">${_("How it Works")}</a>
      </li>
      % if settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
        <li class="item nav-global-02">
          <a href="${marketing_link('COURSES')}">${_("Courses")}</a>
        </li>
      % endif
      <li class="item nav-global-03">
        <a href="${marketing_link('SCHOOLS')}">${_("Schools")}</a>
      </li>
    % endif
  </%block>

  <%block name="navigation_other_global_links">
    % if not settings.FEATURES['DISABLE_LOGIN_BUTTON'] and not combined_login_and_register:
      % if settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'):
        <li class="item nav-global-05">
          <a class="btn" href="/courses">${_("Explore Courses")}</a>
        </li>
      %endif
      % if course and settings.FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
        <li class="item nav-global-04">
          <a class="btn-neutral btn-register" href="${reverse('course-specific-register', args=[course.id.to_deprecated_string()])}">${_("Register")}</a>
        </li>
      % elif static.get_value('ALLOW_PUBLIC_ACCOUNT_CREATION', settings.FEATURES.get('ALLOW_PUBLIC_ACCOUNT_CREATION')):
        <li class="item nav-global-04">
          <a class="btn-neutral btn-register" href="/register${login_query()}">${_("Register")}</a>
        </li>
      % endif
    % endif
  </%block>
</ol>

<ol class="right nav-courseware list-inline">
  <%block name="navigation_sign_in">
    <li class="item nav-courseware-01">
      % if not settings.FEATURES['DISABLE_LOGIN_BUTTON'] and not combined_login_and_register:
        % if course and settings.FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
          <a class="btn btn-login" href="${reverse('course-specific-login', args=[course.id.to_deprecated_string()])}${login_query()}">${_("Sign in")}</a>
        % else:
          <a class="btn btn-login" href="/login${login_query()}">${_("Sign in")}</a>
        % endif
      % endif
    </li>
  </%block>
</ol>