Files
iTop/templates/pages/backoffice/layout.html.twig
Molkobain 61d611c136 N°2847 - Rework iTopWebPage layout (WIP Part VIII)
- Navigation menu: Change scrollbar color to something more visible
- Navigation menu: Close drawer when filter focused and "Escape" key hit
- Top bar: Fix element's ID in its standard delivery
- Top bar: Fix drawers opening under the top bar but above the main content
- iTopWebPage: Add AddUiBlock() method to easily add a layout/component in the page
- iTopWebPage: Fix Header/Footer parts (formerly North/South Panels) and Banner part
- WebPage: Handle duplicate stylesheets (like it was already doing for JS scripts)
2020-08-02 21:35:33 +02:00

91 lines
3.3 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 }}" />
<link rel="search" type="application/opensearchdescription+xml" title="iTop" href="{{ aPage.sAbsoluteUrlAppRoot }}pages/opensearch.xml.php" />
{# 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 %}
</head>
<body data-gui-type="backoffice">
{{ render_block(aLayouts.oNavigationMenu) }}
<div id="ibo-page-container">
<div id="ibo-top-container">
{{ include('pages/backoffice/extension-blocks/banner.html.twig') }}
{{ render_block(aLayouts.oTopBar) }}
</div>
{{ include('pages/backoffice/extension-blocks/header.html.twig') }}
<main id="ibo-page-content">
{{ aPage.sSanitizedContent|raw }}
{# TODO: Remove this when modal development is done #}
<div id="at_the_end">{{ aPage.sDeferredContent|raw }}</div>
<div style="display:none" title="ex2" id="ex2">Please wait...</div>
<div style="display:none" title="dialog" id="ModalDlg"></div>
<div style="display:none" id="ajax_content"></div>
</main>
{{ include('pages/backoffice/extension-blocks/footer.html.twig') }}
</div>
{% block iboPageJsFiles %}
{% for sJsFile in aPage.aJsFiles %}
<script type="text/javascript" src="{{ sJsFile|add_itop_version }}"></script>
{% endfor %}
{% endblock %}
{% 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 %}
setTimeout(function(){
{% for sJsInline in aPage.aJsInlineOnDomReady %}
{{ sJsInline|raw }}
{% endfor %}
}, 50);
{% 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>