Ajout modèle Chant
This commit is contained in:
parent
78cb3bae07
commit
c7a08b3d3c
14 changed files with 220 additions and 11 deletions
|
|
@ -8,6 +8,7 @@
|
|||
<link href="{% static 'css/main.css' %}" rel="stylesheet">
|
||||
<link rel="manifest" href="{% url 'manifest' %}" crossorigin="use-credentials">
|
||||
<script src="{% static 'vendor/bootstrap.bundle.min.js' %}"></script>
|
||||
<script src="{% static 'js/main.js' %}"></script>
|
||||
</head>
|
||||
<body class="{% block bodyclass %}{% endblock %}">
|
||||
{% block header %}
|
||||
|
|
@ -39,6 +40,17 @@
|
|||
{% endblock header %}
|
||||
|
||||
<div class="container mt-4">
|
||||
{% if messages %}
|
||||
<ul class="list-unstyled messages">
|
||||
{% for message in messages %}
|
||||
<li class="alert {{ message.tags }} alert-dismissible" role="alert">
|
||||
{{ message|linebreaksbr|capfirst }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
10
templates/membres/chant_edit.html
Normal file
10
templates/membres/chant_edit.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Édition/ajout de chant</h2>
|
||||
|
||||
<form method="post">{% csrf_token %}
|
||||
{{ form.as_div }}
|
||||
<div class="mt-3"><button type="submit" class="btn btn-primary">Enregistrer</button></div>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
|
@ -5,11 +5,29 @@
|
|||
<form action="{% url 'logout' %}" method="post">{% csrf_token %}<button class="btn btn-sm btn-light" type="submit">Déconnexion</button></form>
|
||||
</div>
|
||||
<h2>Espace membres</h2>
|
||||
<div class="row mt-4">
|
||||
<div class="col col-4"><a href="{% url 'liste-membres' %}">Liste des membres</a></div>
|
||||
<div class="col col-4"><a href="{% url 'docs-membres' %}">Documents pour les membres</a></div>
|
||||
<div class="row align-items-center mt-4 gx-3 gy-3">
|
||||
<div class="col-sm-6 col-md-3">
|
||||
<div class="card card-membres">
|
||||
<a href="{% url 'liste-chants' %}"><div class="card-title text-center p-3 fs-5">Liste des chants</div></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-3">
|
||||
<div class="card card-membres">
|
||||
<a href="{% url 'docs-membres' %}"><div class="card-title text-center p-3 fs-5">Documents pour les membres</div></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-3">
|
||||
<div class="card card-membres">
|
||||
<a href="{% url 'liste-membres' %}"><div class="card-title text-center p-3 fs-5">Liste des membres</div></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if perms.beesgospel.change_agenda %}
|
||||
<div class="col col-4"><a href="{% url 'admin:beesgospel_agenda_changelist' %}">Gestion de l’agenda</a></div>
|
||||
<div class="col-sm-6 col-md-3">
|
||||
<div class="card card-membres">
|
||||
<a href="{% url 'admin:beesgospel_agenda_changelist' %}"><div class="card-title text-center p-3 fs-5">Gestion de l’agenda</div></a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<img src="{% static 'admin/img/icon-changelink.svg' %}">
|
||||
</a>
|
||||
<form method="post" class="d-inline" action="{% url 'membre-delete' membre.pk %}">{% csrf_token %}
|
||||
<button type="submit" class="btn btn-link edit-button"><img src="{% static 'admin/img/icon-deletelink.svg' %}"></button>
|
||||
<button type="submit" class="btn btn-link delete-button"><img src="{% static 'admin/img/icon-deletelink.svg' %}"></button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
|
|
|||
27
templates/membres/liste_chants.html
Normal file
27
templates/membres/liste_chants.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Liste des chants</h2>
|
||||
<table class="table table-striped table-responsive table-chants">
|
||||
<tr><th scope="col" class="numero">N°</th><th scope="col">Titre</th><th></th><th scope="col" class="boutons"></th></tr>
|
||||
{% for chant in object_list %}
|
||||
<tr class="editable">
|
||||
<td>{{ chant.numero }}</td>
|
||||
<td>{{ chant.titre }}</td>
|
||||
<td>{{ chant.particularite }}</td>
|
||||
<td class="text-nowrap">{% if perms.beesgospel.change_chant %}
|
||||
<a href="{% url 'chant-edit' chant.pk %}" class="edit-button">
|
||||
<img src="{% static 'admin/img/icon-changelink.svg' %}">
|
||||
</a>
|
||||
<form method="post" class="d-inline" action="{% url 'chant-delete' chant.pk %}">{% csrf_token %}
|
||||
<button type="submit" class="btn btn-link delete-button"><img src="{% static 'admin/img/icon-deletelink.svg' %}"></button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% if perms.beesgospel.add_chant %}
|
||||
<div class="mt-3"><a class="btn btn-outline-primary" href="{% url 'chant-add' %}">Ajouter un chant</a></div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue