<%! from django.utils.translation import ugettext as _ %> <%! from microsite_configuration import microsite %> <%! from microsite_configuration import page_title_breadcrumbs %> <%namespace name='static' file='static_content.html'/> <%! from django.utils import html %> ## Define a couple of helper functions to make life easier when ## embedding theme conditionals into templates. All inheriting ## templates have access to these functions, and we can import these ## into non-inheriting templates via the %namespace tag. <%def name="theme_enabled()"> <% return settings.FEATURES.get("USE_CUSTOM_THEME", False) %> <%def name="stanford_theme_enabled()"> <% if not theme_enabled(): return False return getattr(settings, "THEME_NAME", None) == "stanford" %> ## this needs to be here to prevent the title from mysteriously appearing in the body, in one case <%def name="pagetitle()" /> <%block name="title"> ${page_title_breadcrumbs(self.pagetitle())} <%static:css group='style-vendor'/> <%static:css group='style-app'/> <%static:css group='style-app-extend1'/> <%static:css group='style-app-extend2'/> <%static:js group='main_vendor'/> <%block name="headextra"/> <% if theme_enabled(): header_extra_file = 'theme-head-extra.html' header_file = 'theme-header.html' google_analytics_file = 'theme-google-analytics.html' footer_file = 'theme-footer.html' style_overrides_file = None else: header_extra_file = None header_file = microsite.get_template_path('navigation.html') google_analytics_file = microsite.get_template_path('google_analytics.html') if getattr(settings, 'SITE_NAME', '').endswith('edx.org'): footer_file = microsite.get_template_path('edx_footer.html') else: footer_file = microsite.get_template_path('footer.html') style_overrides_file = microsite.get_value('css_overrides_file') %> % if header_extra_file: <%include file="${header_extra_file}" /> % endif <%include file="${google_analytics_file}" /> % if style_overrides_file: % endif #content">${_("Skip to this view's content")} <%include file="mathjax_accessible.html" /> <%include file="${header_file}" />
${self.body()} <%block name="bodyextra"/>
<%include file="${footer_file}" /> <%static:js group='application'/> <%static:js group='module-js'/> <%block name="js_extra"/> <%include file="widgets/segment-io.html" /> <%def name="login_query()">${ u"?course_id={0}&enrollment_action={1}".format( html.escape(course_id), html.escape(enrollment_action) ) if course_id and enrollment_action else "" }