111 lines
3 KiB
HTML
111 lines
3 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<h1>Page d'administration du site</h1>
|
|
<h2>Liste des catégories</h2>
|
|
<a class="btn btn-success btn-sm" role="button" href="{% url 'content:category-new' %}">
|
|
<i class="fas fa-plus"></i>
|
|
Créer une nouvelle catégorie
|
|
</a>
|
|
<br />
|
|
<br />
|
|
<table class="table table-striped">
|
|
<tr>
|
|
<th>Nom de la catégorie</th>
|
|
<th>Nombre de contenus</th>
|
|
<th></th>
|
|
</tr>
|
|
{% for c in categories %}
|
|
<tr>
|
|
<td><a href="{{c.get_absolute_url}}">{{c.name}}</a></td>
|
|
<td>{{c.content_set.count}}</td>
|
|
<td><a class="btn btn-outline-primary btn-sm" href="{% url "content:category-edit" c.pk %}">
|
|
<i class="fas fa-edit"></i>
|
|
Éditer
|
|
</a>
|
|
<a class="btn btn-outline-danger btn-sm" title="Supprimer" href="{% url "content:category-delete" c.pk %}">
|
|
<i class="fas fa-trash-alt"></i>
|
|
Supprimer
|
|
</a>
|
|
</td>
|
|
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
|
|
<h2>Écoles</h2>
|
|
<a class="btn btn-success btn-sm" role="button" href="{% url 'users:new-school' %}">
|
|
<i class="fas fa-plus"></i>
|
|
Inscrire une nouvelle école
|
|
</a>
|
|
<br />
|
|
<br/>
|
|
<table class="table table-striped">
|
|
<tr>
|
|
<th>Nom</th>
|
|
<th>Nombre de membres</th>
|
|
<th></th>
|
|
{% for school in schools %}
|
|
<tr>
|
|
<th>{{school.group.name}}</th>
|
|
<td>{{school.group.user_set.count}}</td>
|
|
<td><a class="btn btn-outline-primary btn-sm" href="{% url "users:edit-school" pk=school.group.pk%}">
|
|
<i class="fas fa-edit"></i>
|
|
Éditer
|
|
</a>
|
|
<a class="btn btn-outline-danger btn-sm" title="Supprimer" href="">
|
|
<i class="fas fa-trash-alt"></i>
|
|
Supprimer
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
<h2>Réglages</h2>
|
|
<a class="btn btn-primary btn-sm" href="{% url 'settings:site-settings' %}">
|
|
<i class="fas fa-edit"></i>
|
|
Éditer
|
|
</a>
|
|
<br />
|
|
<br />
|
|
<table class="table table-striped">
|
|
<tr>
|
|
<th>Upload</th>
|
|
<td>
|
|
{% if site_settings.allow_upload %}
|
|
Autorisé
|
|
{% else %}
|
|
Non autorisé
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Message d'accueil</th>
|
|
<td>{{site_settings.home_message}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Logo du site</th>
|
|
<td>
|
|
{% if site_settings.site_logo %}
|
|
<img src="{{ site_settings.site_logo.url }}" alt="logo"/>
|
|
{% else %}
|
|
Pas de logo
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Affiche de l'événement</th>
|
|
<td>
|
|
{% if site_settings.event_poster %}
|
|
<img class="w-100" src="{{ site_settings.event_poster.url }}" alt="affiche"/>
|
|
{% else %}
|
|
Pas d'affiche
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Nombre minimal de catégories</th>
|
|
<td>{{ site_settings.min_number_of_categories }}</td>
|
|
</tr>
|
|
</table>
|
|
{% endblock %}
|