mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
62 lines
2.1 KiB
Twig
62 lines
2.1 KiB
Twig
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
|
|
{# @license http://opensource.org/licenses/AGPL-3.0 #}
|
|
{% apply spaceless %}
|
|
{% if bEscapeContent %}
|
|
{{ render_block(oLayout, {aPage: aPage})|escape }}
|
|
{% else %}
|
|
{{ render_block(oLayout, {aPage: aPage}) }}
|
|
{% endif %}
|
|
|
|
{% if aDeferredBlocks is not empty %}
|
|
{# TODO 3.0.0 #}
|
|
{# <script type="text/javascript"> #}
|
|
{# $('body').append('{% for oBlock in aDeferredBlocks %}{{ render_block(oBlock, {aPage: aPage})|escape_for_js_string|raw }}{% endfor %}'); #}
|
|
{# </script> #}
|
|
{% for oBlock in aDeferredBlocks %}
|
|
{{ render_block(oBlock, {aPage: aPage})|raw }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% 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 multi-line comment) #}
|
|
<script type="text/javascript">
|
|
{{ sJsInline|raw }}
|
|
</script>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{% if sDeferredContent %}
|
|
<script type="text/javascript">
|
|
$('body').append('{{ sDeferredContent|raw }}');
|
|
</script>
|
|
{% endif %}
|
|
|
|
{% block iboPageJsFiles %}
|
|
{% for sJsFile in aPage.aJsFiles %}
|
|
<script type="text/javascript">
|
|
$.getScript('{{ sJsFile|raw }}');
|
|
</script>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
|
|
{% block iboPageJsInlineOnDomReady %}
|
|
{% for sJsInline in aPage.aJsInlineOnDomReady %}
|
|
<script type="text/javascript">
|
|
{{ sJsInline|raw }}
|
|
</script>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{% block iboPageCssFiles %}
|
|
{% for aCssFileData in aPage.aCssFiles %}
|
|
<script type="text/javascript">
|
|
if (!$('link[href="{{ aCssFileData.link }}"]').length) $('<link href="{{ aCssFileData.link }}" rel="stylesheet">').appendTo('head');
|
|
</script>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{{ aPage.sCapturedOutput|raw }}
|
|
|
|
{% endapply %} |