## coding=utf-8 ## mako ## ## Studio view template for rendering the whole Unit in an iframe with ## XBlocks controls specifically for Authoring MFE. This template renders ## a chromeless version of a unit container without headers, footers, ## and a navigation bar. <%! main_css = "style-main-v1" %> <%! course_unit_mfe_iframe_css = "course-unit-mfe-iframe-bundle" %> <%namespace name='static' file='static_content.html'/> <%! from django.urls import reverse from django.utils.translation import gettext as _ from cms.djangoapps.contentstore.config.waffle import CUSTOM_RELATIVE_DATES from cms.djangoapps.contentstore.helpers import xblock_type_display_name from lms.djangoapps.branding import api as branding_api from openedx.core.djangoapps.util.user_messages import PageLevelMessages from openedx.core.djangolib.js_utils import ( dump_js_escaped_json, js_escaped_string ) from openedx.core.djangolib.markup import HTML, Text from openedx.core.release import RELEASE_LINE %> <%page expression_filter="h"/> ${xblock.display_name_with_default} ${xblock_type_display_name(xblock)} | % if context_course: <% ctx_loc = context_course.location %> ${context_course.display_name_with_default} | % elif context_library: ${context_library.display_name_with_default} | % endif ${settings.STUDIO_NAME} <% jsi18n_path = "js/i18n/{language}/djangojs.js".format(language=LANGUAGE_CODE) %> % if getattr(settings, 'CAPTURE_CONSOLE_LOG', False): % endif % if settings.DEBUG: ## Provides a fallback for gettext functions in development environment % endif <% favicon_url = branding_api.get_favicon_url() %> <%static:css group='style-vendor'/> <%static:css group='style-vendor-tinymce-content'/> <%static:css group='style-vendor-tinymce-skin'/> % if uses_bootstrap: % else: <%static:css group='${self.attr.main_css}'/> % endif <%static:css group='${self.attr.course_unit_mfe_iframe_css}'/> <%include file="widgets/segment-io.html" /> % for template_name in templates: % endfor ## The following stylesheets are included for studio-frontend debugging. ## Remove this as part of studio frontend deprecation. ## https://github.com/openedx/studio-frontend/issues/381 % if not settings.STUDIO_FRONTEND_CONTAINER_URL: % endif ${_("Skip to main content")} <%static:js group='base_vendor'/> <%static:webpack entry="commons"/>
<% banner_messages = list(PageLevelMessages.user_messages(request)) %> % if banner_messages:
% for message in banner_messages: % endfor
% endif
<% assets_url = reverse('assets_handler', kwargs={'course_key_string': str(xblock_locator.course_key)}) %>

${_("Loading")}

% if context_course: <%static:webpack entry="js/factories/context_course"/> % endif <%static:webpack entry="js/factories/container"> ContainerFactory( ${component_templates | n, dump_js_escaped_json}, ${xblock_info | n, dump_js_escaped_json}, "${action | n, js_escaped_string}", { isUnitPage: ${is_unit_page | n, dump_js_escaped_json}, canEdit: true, outlineURL: "${outline_url | n, js_escaped_string}", clipboardData: ${user_clipboard | n, dump_js_escaped_json}, isIframeEmbed: true, } ); ## Initialize MutationObserver and ResizeObserver to update the iframe size. ## These are used to provide resize events for the Authoring MFE.