diff --git a/sapl/base/templatetags/common_tags.py b/sapl/base/templatetags/common_tags.py index 419899632..eb53629a0 100644 --- a/sapl/base/templatetags/common_tags.py +++ b/sapl/base/templatetags/common_tags.py @@ -117,6 +117,23 @@ def str2intabs(value): except: return '' +@register.filter +def has_iframe(request): + + iframe = request.session.get('iframe', False) + if not iframe and 'iframe' in request.GET: + ival = request.GET['iframe'] + if ival and int(ival) == 1: + request.session['iframe'] = True + return True + elif 'iframe' in request.GET: + ival = request.GET['iframe'] + if ival and int(ival) == 0: + del request.session['iframe'] + return False + + return iframe + @register.filter def url(value): diff --git a/sapl/templates/base.html b/sapl/templates/base.html index 88b877016..9feb3d90f 100644 --- a/sapl/templates/base.html +++ b/sapl/templates/base.html @@ -28,6 +28,7 @@
+ {% if not request|has_iframe %} {% block navigation %} {% endblock navigation %} + {% endif %} {# Header #} {% block main_header %} @@ -108,7 +110,6 @@ {# Main content #} {% block content_container %}
-
{# Feedback messages #} @@ -152,7 +153,7 @@ {% endblock content_container %} - + {% if not request|has_iframe %} {% block footer_container %}
@@ -209,6 +210,7 @@
{% endblock footer_container %} + {% endif %} {% block foot_js %}