-
Benjamin Hättasch authored
This is necessary since django-bootstrap4 expects a bootstrap javascript version that already includes popper Bump jquery to 3.5.1 Bump bootstrap to 4.6.0 Remove separate popper lib Adjust paths in settings. This also makes sure that the local jquery version is always used, which was previously not the case for admin views that depended on code.jquery.com Remove explicit popper loading that was introduced in 2c359090 to mitigate the effects of the update in c0b3478c
Benjamin Hättasch authoredThis is necessary since django-bootstrap4 expects a bootstrap javascript version that already includes popper Bump jquery to 3.5.1 Bump bootstrap to 4.6.0 Remove separate popper lib Adjust paths in settings. This also makes sure that the local jquery version is always used, which was previously not the case for admin views that depended on code.jquery.com Remove explicit popper loading that was introduced in 2c359090 to mitigate the effects of the update in c0b3478c
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
base.html 3.58 KiB
{% load static %}
{% load i18n %}
{% load bootstrap4 %}
{% load fontawesome_5 %}
{% load tags_AKModel %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{% block meta %}{% endblock%}
<title>{% block title %}AK Planning{% endblock %}</title>
<!-- Load bootstrap, jquery and fontawesome-->
{% bootstrap_css %}
{% bootstrap_javascript jquery='slim' %}
{% fontawesome_5_static %}
<link rel="stylesheet" href="{% static 'common/css/custom.css' %}">
<script type='text/javascript'>
var changed_form = false;
$(document).ready(function() {
// Ask before changing language if user changed main form on page
$("#language-switcher").submit(function(e){
if(changed_form) {
if(!confirm("{% trans 'Are you sure you want to change the language now? This will clear the form!' %}"))
e.preventDefault(e);
}
});
// Remember any main form edits/changes
$("form.post-form :input").change(function(){
if($(this).val() != '')
changed_form = true;
});
});
</script>
{% block imports %}{% endblock %}
</head>
<body>
{% block language-switcher %}
<!-- language switcher -->
<div class="container" style="margin-top:20px">
<form action="{% url 'set_language' %}"
method="post"
class="form-inline"
name="language-form"
id="language-switcher"
style="flex-direction: column;">
{% csrf_token %}
<input name="next" type="hidden" value="{{ request.path }}" />
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
<div style="align-self: end;">
{% for language in languages %}
<button type="submit"
class="btn {% if language.code == LANGUAGE_CODE %}btn-info{% else %}btn-outline-info{% endif %}"
name="language"
value="{{ language.code }}"
style="align-self: end;">
{{ language.code | upper }}
</button>
{% endfor %}
</div>
</form>
</div>
{% endblock %}
<div class="container" style="margin-top:15px;margin-bottom: 30px;">
<ol class="breadcrumb">
{% block breadcrumbs %}
{% endblock %}
</ol>
</div>
<div class="container">
{% block content %}
{% endblock %}
</div>
<div class="container" style="margin-top: 20px">
<div id="footer" style="padding-top:10px;padding-bottom:10px;border-top:1px solid grey;">
{% block footer_custom %}
{% endblock %}
{% footer_info as FI %}
{% if FI.impress_text %}
{{ FI.impress_text }} ·
{% endif %}
{% if FI.impress_url %}
<a href="{{ FI.impress_url }}">{% trans "Impress" %}</a> ·
{% endif %}
{% if FI.repo_url %}
<a href="{{ FI.repo_url }}">{% trans "This software is open source" %}</a>
{% endif %}
</div>
</div>
{% block bottom_script %}{% endblock %}
</body>
</html>