## 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="hd logo-header">
  <div class="logo">
    <a href="${branding_api.get_home_url()}">
      <%block name="navigation_logo">
      <img src="${branding_api.get_logo_url(is_secure)}" alt="${_("{platform_name} Home Page").format(platform_name=static.get_platform_name())}"/>
      </%block>
    </a>
  </div>
  % if enable_enterprise_sidebar:
    <span class="enterprise-tagline">
      <% tagline = configuration_helpers.get_value('ENTERPRISE_TAGLINE', settings.ENTERPRISE_TAGLINE) %>
      ${tagline}
    </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>
