## mako

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

<%namespace name='static' file='../static_content.html'/>
<%!
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from lms.djangoapps.ccx.overrides import get_current_ccx
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers

# App that handles subdomain specific branding
from branding import api as branding_api
%>

<h1 class="header-logo">
  <a href="${reverse('dashboard')}">
    <%block name="navigation_logo">
    <img  class="logo" src="${branding_api.get_logo_url(is_secure)}" alt="${_("{platform_name} Home Page").format(platform_name=static.get_platform_name())}"/>
    </%block>
  </a>
  % if enable_enterprise_sidebar:
    <span class="enterprise-tagline">
      <% tagline = configuration_helpers.get_value('ENTERPRISE_TAGLINE', settings.ENTERPRISE_TAGLINE) %>
      % if tagline:
        ${tagline}
      % endif
    </span>
  % endif
  % if course:
    <div class="course-header">
      <span class="provider">${course.display_org_with_default}:</span>
      <span class="course-number">${course.display_number_with_default}</span>
      <%
      display_name = course.display_name_with_default
      if settings.FEATURES.get('CUSTOM_COURSES_EDX', False):
        ccx = get_current_ccx(course.id)
        if ccx:
          display_name = ccx.display_name
      %>
      <span class="course-name">${display_name}</span>
    </div>
  % endif
</h1>
