Ejemplo n.º 1
0
def user_async_assets():
    """
    Using in a template will inject script tags that include the javascript assets defined
    by any concrete hook that subclasses UserSyncHook.
    :return: HTML of script tags to insert into user/user.html
    """
    return webpack_asset_render(hooks.UserAsyncHook, is_async=True)
Ejemplo n.º 2
0
def coach_async_assets():
    """
    Using in a template will inject script tags that include the javascript assets defined
    by any concrete hook that subclasses CoachSyncHook.
    :return: HTML of script tags to insert into coach/coach.html
    """
    return webpack_asset_render(hooks.CoachAsyncHook, async=True)
Ejemplo n.º 3
0
def style_guide_async_assets():
    """
    Using in a template will inject script tags that include the javascript assets defined
    by any concrete hook that subclasses StyleGuideSyncHook.
    :return: HTML of script tags to insert into style_guide/style_guide.html
    """
    return webpack_asset_render(hooks.StyleGuideAsyncHook, is_async=True)
Ejemplo n.º 4
0
def coach_assets():
    """
    Using in a template will inject script tags that include the javascript assets defined
    by any concrete hook that subclasses CoachSyncHook.
    :return: HTML of script tags to insert into coach/coach.html
    """
    return webpack_asset_render(hooks.CoachSyncHook, is_async=False)
Ejemplo n.º 5
0
def user_async_assets():
    """
    Using in a template will inject script tags that include the javascript assets defined
    by any concrete hook that subclasses UserSyncHook.
    :return: HTML of script tags to insert into user/user.html
    """
    return webpack_asset_render(hooks.UserAsyncHook, async=True)
Ejemplo n.º 6
0
def setup_wizard_async_assets():
    """
    Using in a template will inject script tags that include the javascript assets defined
    by any concrete hook that subclasses ManagementSyncHook.

    :return: HTML of script tags to insert into setup_wizard/setup_wizard.html
    """
    return webpack_asset_render(hooks.SetupWizardAsyncHook, is_async=True)
Ejemplo n.º 7
0
def management_assets():
    """
    Using in a template will inject script tags that include the javascript assets defined
    by any concrete hook that subclasses ManagementSyncHook.

    :return: HTML of script tags to insert into management/management.html
    """
    return webpack_asset_render(hooks.ManagementSyncHook, async=False)
Ejemplo n.º 8
0
def setup_wizard_async_assets():
    """
    Using in a template will inject script tags that include the javascript assets defined
    by any concrete hook that subclasses ManagementSyncHook.

    :return: HTML of script tags to insert into setup_wizard/setup_wizard.html
    """
    return webpack_asset_render(hooks.SetupWizardAsyncHook, async=True)
Ejemplo n.º 9
0
def learn_assets():
    """
    Using in a template will inject script tags that include the javascript assets defined
    by any concrete hook that subclasses ManagementSyncHook.

    :return: HTML of script tags to insert into management/management.html
    """
    return webpack_asset_render(hooks.LearnSyncHook, is_async=False)
Ejemplo n.º 10
0
def facility_management_assets():
    """
    Using in a template will inject script tags that include the javascript
    assets defined by any concrete hook that subclasses
    FacilityManagementSyncHook.

    :return: HTML of script tags to insert into the template
    """
    return webpack_asset_render(FacilityManagementSyncHook, is_async=False)
Ejemplo n.º 11
0
def content_renderer_assets():
    """
    This is a script tag for all ``ContentRendererInclusionHook`` hooks that implement a
    render_to_html() method - this is used in in any template to
    register any content renderers with the frontend so that they can be dynamically loaded
    on demand.

    :return: HTML of script tags to insert into template
    """
    return webpack_asset_render(hooks.ContentRendererHook, is_async=True)
Ejemplo n.º 12
0
def kolibri_navigation_actions():
    """
    A tag to include an initial JS-object to bootstrap nav action data into the app.
    :return: An html string
    """
    return webpack_asset_render(NavigationHook)
Ejemplo n.º 13
0
def device_management_assets():
    return webpack_asset_render(hooks.DeviceManagementSyncHook, async=False)