mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-28 13:08:45 +02:00
77 lines
2.6 KiB
Twig
77 lines
2.6 KiB
Twig
<!DOCTYPE html>
|
|
<html lang="{{ aPage.aMetadata.sLang }}">
|
|
<head>
|
|
<meta charset="{{ aPage.aMetadata.sCharset }}">
|
|
{# This block can be used to add your own meta tags by extending the default template #}
|
|
{% block iboPageExtraMetas %}
|
|
{% endblock %}
|
|
{% if aPage.aMetadata.sBaseUrl is defined %}
|
|
<base href="{{ aPage.aMetadata.sBaseUrl }}">
|
|
{% endif %}
|
|
<title>{{ aPage.sTitle }}</title>
|
|
<link rel="shortcut icon" href="{{ aPage.sFaviconUrl|add_itop_version }}" />
|
|
|
|
{# Stylesheets MUST be loaded before any scripts otherwise we may face problems such as
|
|
- Visual glitches
|
|
- jQuery scripts spurious problems (like failing on a 'reload') #}
|
|
{% block iboPageCssFiles %}
|
|
{% for aCssFileData in aPage.aCssFiles %}
|
|
{% if aCssFileData['condition'] != '' %}<!--[if {{ aCssFileData['condition'] }}]>{% endif %}
|
|
<link type="text/css" href="{{ aCssFileData['link']|add_itop_version }}" rel="stylesheet" />
|
|
{% if aCssFileData['condition'] != '' %}<![endif]-->{% endif %}
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{% block iboPageCssInline %}
|
|
{# We put each styles in a dedicated style tag to prevent massive failure if 1 style is broken (eg. missing semi-colon, bracket, ...) #}
|
|
{% for sCssInline in aPage.aCssInline %}
|
|
<style>
|
|
{{ sCssInline|raw }}
|
|
</style>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{% block iboPageJsFiles %}
|
|
{% for sJsFile in aPage.aJsFiles %}
|
|
<script type="text/javascript" src="{{ sJsFile|add_itop_version }}"></script>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
</head>
|
|
<body data-gui-type="backoffice">
|
|
{{ include('layouts/navigation-menu/layout.html.twig', { aNavigationMenu: aLayouts.aNavigationMenu }) }}
|
|
<div id="ibo-page-container">
|
|
{{ include('layouts/top-bar/layout.html.twig', { aTopBar: aLayouts.aTopBar }) }}
|
|
<main id="ibo-page-content">
|
|
{{ aPage.aSanitizedContent|raw }}
|
|
</main>
|
|
</div>
|
|
|
|
{% block iboPageJsInlineScripts %}
|
|
<script type="text/javascript">
|
|
{# TODO: How to do this in native JS? #}
|
|
$(document).ready(function(){
|
|
{% block iboPageJsInlineOnInit %}
|
|
{% for sJsInline in aPage.aJsInlineOnInit %}
|
|
{{ sJsInline|raw }}
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{% block iboPageJsInlineOnDomReady %}
|
|
{% for sJsInline in aPage.aJsInlineOnDomReady %}
|
|
{{ sJsInline|raw }}
|
|
{% endfor %}
|
|
{% endblock %}
|
|
});
|
|
</script>
|
|
|
|
{% block iboPageJsInlineLive %}
|
|
{% for sJsInline in aPage.aJsInlineLive %}
|
|
{# We put each scripts in a dedicated script tag to prevent massive failure if 1 script is broken (eg. missing semi-colon or non closed comment) #}
|
|
<script type="text/javascript">
|
|
{{ sJsInline|raw }}
|
|
</script>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
{% endblock %}
|
|
</body>
|
|
</html> |