[FIX] base.html prepared for public views

Certain things need to be behind `{% if user.is_authenticated %}` in order for the base template to play nice with public views.
This commit is contained in:
Peter Pfeufer 2023-08-02 23:17:28 +02:00
parent 12383d79c8
commit f23d4f4dd1
No known key found for this signature in database
GPG Key ID: 6051D2C6AD4EBC27

View File

@ -21,33 +21,39 @@
</head> </head>
<body class="{% if NIGHT_MODE %}template-dark-mode{% else %}template-light-mode{% endif %}"> <body class="{% if NIGHT_MODE %}template-dark-mode{% else %}template-light-mode{% endif %}">
{% if user.is_authenticated %} <div id="wrapper" class="container">
<div id="wrapper" class="container"> <!-- Navigation -->
<!-- Navigation --> {% include 'allianceauth/top-menu.html' %}
{% include 'allianceauth/top-menu.html' %}
<div class="row" id="site-body-wrapper"> <div class="clearfix{% if user.is_authenticated %} row{% endif %}" id="site-body-wrapper">
{% if user.is_authenticated %}
{% include 'allianceauth/side-menu.html' %} {% include 'allianceauth/side-menu.html' %}
<div class="col-sm-10"> {% endif %}
<div class="{% if user.is_authenticated %}col-sm-10{% else %}col-sm-12{% endif %}">
{% if user.is_authenticated %}
{% include 'allianceauth/messages.html' %} {% include 'allianceauth/messages.html' %}
{% block content %} {% endif %}
{% endblock content %}
</div> {% block content %}
<div class="clearfix"></div> {% endblock content %}
</div> </div>
</div> </div>
{% endif %} </div>
{% include 'bundles/bootstrap-js.html' %} {% include 'bundles/bootstrap-js.html' %}
{% include 'bundles/jquery-visibility-js.html' %} {% include 'bundles/jquery-visibility-js.html' %}
<script> {% if user.is_authenticated %}
let notificationUPdateSettings = { <script>
notificationsListViewUrl: "{% url 'notifications:list' %}", let notificationUPdateSettings = {
notificationsRefreshTime: "{% notifications_refresh_time %}", notificationsListViewUrl: "{% url 'notifications:list' %}",
userNotificationsCountViewUrl: "{% url 'notifications:user_notifications_count' request.user.pk %}" notificationsRefreshTime: "{% notifications_refresh_time %}",
}; userNotificationsCountViewUrl: "{% url 'notifications:user_notifications_count' request.user.pk %}"
</script> };
{% include 'bundles/refresh-notifications-js.html' %} </script>
{% include 'bundles/refresh-notifications-js.html' %}
{% endif %}
{% include 'bundles/evetime-js.html' %} {% include 'bundles/evetime-js.html' %}
{% block extra_javascript %} {% block extra_javascript %}