ninegate/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/viewurl.html.twig

54 lines
1.7 KiB
Twig

{% extends '@CadolesCore/base.html.twig' %}
{% block localstyle %}
#pageiframe { margin: 0px -30px;}
{% endblock %}
{% block pagewrapper %}
{% if access=="config" %}
<div class="pagemenu">
<a href="{{ path('cadoles_portal_config_page_view', {id:entity.id})}}">{{ entity.name }}</a>
<a href='{{ path('cadoles_portal_config_page_update', {id:entity.id}) }}' title='Modifier le panel'><i class='fa fa-file fa-fw'></i></a>
<a href='{{ path('cadoles_portal_config_page_delete', { id: entity.id }) }}' data-method='delete' data-confirm='Êtes-vous sûr de vouloir supprimer ?' title='Supprimer le panel'><i class='fa fa-trash fa-fw'></i></a>
</div>
{% endif %}
<div id="pageiframe" style="{% if entity.maxwidth>0%} max-width:{{ entity.maxwidth }}px; margin:auto; {% endif %}">
<iframe src="{{entity.url}}" id="frameContent" style="border:none;" width="100%" height="100%"></iframe>
</div>
{% endblock %}
{% block localjavascript %}
$(window).resize(function() {
resizeFrame();
});
$('document').ready(function(){
resizeFrame();
});
function resizeFrame() {
$("body").css("overflow-y","hidden");
$(".col-md-10").css("padding","0");
var iFrame = document.getElementById('frameContent');
var heightbody = $('html').height();
var heightheader = $('.header').height();
if($('.pagemenu').css("display")=="none")
var heightmenu = 0;
else
var heightmenu = $('.pagemenu').height();
var heightframe = heightbody-heightheader-heightmenu;
if($("#frameContent").length>0) {
$("#frameContent").height(heightframe);
}
}
{% endblock %}