1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2024-11-27 00:07:12 +00:00
med/theme/templates/admin/base_site.html

122 lines
5.1 KiB
HTML
Raw Normal View History

2019-08-02 13:33:38 +00:00
{% extends "admin/base.html" %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n staticfiles %}
{% block title %}{{ title }} | {{ request.site.name }}{% endblock %}
{% block branding %}
2019-08-02 15:50:10 +00:00
<a href="/">
<img src="{% static "images/logo.png" %}" height="40px" alt=""/>
<strong id="site-name">
{{ request.site.name }}
</strong>
</a>
2019-08-02 13:33:38 +00:00
{% endblock %}
{% block usertools %}
2019-08-03 11:25:58 +00:00
<div id="user-tools">
{% block welcome-msg %}
{% if user.is_authenticated %}
2019-08-02 13:33:38 +00:00
{% trans 'Welcome,' %}
<strong>{% firstof user.get_short_name user.get_username %}</strong>.
2019-08-03 11:25:58 +00:00
{% endif %}
{% endblock %}
{% block userlinks %}
2019-08-10 06:04:46 +00:00
{% if available_apps %}
{# When in admin site, list all admin pages and documentation #}
<span class="dropdown">
2019-08-09 20:26:32 +00:00
<a href="{% url 'admin:index' %}">{% trans 'Explore database' %}</a>
2019-08-02 13:33:38 +00:00
<span class="dropdown-content">
<a href="{% url "media:find" %}">Recherche ...</a>
2019-08-02 13:33:38 +00:00
{% for app in available_apps %}
{% for model in app.models %}
{% if model.admin_url %}
<a href="{{ model.admin_url }}">{{ model.name }}</a>
{% endif %}
{% endfor %}
{% endfor %}
2019-08-09 20:52:47 +00:00
<a href="{% url "logs:index" %}">Statistiques</a>
2019-08-02 13:33:38 +00:00
{% if user.is_active and user.is_superuser %}
{% url 'django-admindocs-docroot' as docsroot %}
{% if docsroot %}
<a href="{{ docsroot }}">{% trans 'Documentation' %}</a>
{% endif %}
{% endif %}
</span>
</span> /
2019-08-10 06:04:46 +00:00
{% else %}
{# When not in admin site, but user is staff then add a link #}
<a href="{% url 'admin:index' %}">{% trans 'Explore database' %}</a> /
{% endif %}
{% if user.is_authenticated %}
2019-08-02 13:33:38 +00:00
<a href="{% url 'logout' %}">{% trans 'Log out' %}</a>
2019-08-03 11:25:58 +00:00
{% else %}
2021-11-04 10:29:03 +00:00
<a href="{% url 'users:login' %}">{% trans 'Log in' %}</a>
2019-08-03 11:25:58 +00:00
{% endif %}
{% endblock %}
</div>
2019-08-02 13:33:38 +00:00
{% endblock %}
{% block extrastyle %}
<link rel="stylesheet" type="text/css" href="{% static "css/admin.css" %}"/>
{# Favicon #}
<link rel="apple-touch-icon" sizes="180x180" href="{% static "favicon/apple-touch-icon.png" %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static "favicon/favicon-32x32.png" %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% static "favicon/favicon-16x16.png" %}">
<link rel="manifest" href="{% static "favicon/site.webmanifest" %}">
<link rel="mask-icon" href="{% static "favicon/safari-pinned-tab.svg" %}" color="#5bbad5">
<link rel="shortcut icon" href="{% static "favicon/favicon.ico" %}">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="{% static "favicon/browserconfig.xml" %}">
<meta name="theme-color" content="#ffffff">
{% endblock %}
{% block footer %}
{% if not is_popup %}
<div id="footer">
<form action="{% url 'set_language' %}" method="post">
{% csrf_token %}
<select title="language" name="language" onchange="this.form.submit()">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
2019-08-16 18:14:52 +00:00
<option value="{{ language.code }}"
{% if language.code == LANGUAGE_CODE %} selected{% endif %}>
2019-08-02 13:33:38 +00:00
{{ language.name_local }} ({{ language.code }})
</option>
{% endfor %}
</select>
<noscript>
<input type="submit">
</noscript>
</form>
2019-08-17 10:12:10 +00:00
<p>
2020-12-27 17:22:52 +00:00
Mediatek 2017-2021 &mdash;
<a href="mailto:club-med@crans.org">Nous contacter</a> &mdash;
2020-02-11 20:25:30 +00:00
<a href="{% url "api-root" %}">Explorer l'API</a>
2019-08-17 10:12:10 +00:00
</p>
2019-08-02 13:33:38 +00:00
</div>
{% endif %}
2019-08-16 18:14:52 +00:00
{# Bind CTRL+S to Save button in forms #}
<script type="text/javascript">
if (typeof django !== 'undefined') {
django.jQuery(window).bind('keydown', function (event) {
if (event.ctrlKey || event.metaKey) {
if (String.fromCharCode(event.which).toLowerCase() === 's') {
event.preventDefault();
django.jQuery("#content-main form input[name=_save]").click();
}
}
});
}
</script>
2020-09-25 08:27:43 +00:00
{% block extrajavascript %}{% endblock %}
2019-08-02 13:33:38 +00:00
{% endblock %}