1
|
{% extends "ressources/base.html" %}
|
2
|
|
3
|
{% block header %}
|
4
|
{{ block.super }}
|
5
|
<span>Gestion des ressources - {{ service_name }}</span>
|
6
|
{% endblock %}
|
7
|
|
8
|
{% block appbar %}
|
9
|
<h2>{{ model_verbose_name_plural }}</h2>
|
10
|
<a href="..">Retourner aux ressources</a>
|
11
|
<button id="new-object-button" class='dialog-button' data-default-button="Ajouter" data-url="new/ #form-content">Ajouter « {{ model_verbose_name }} »</button>
|
12
|
{% endblock %}
|
13
|
|
14
|
{% block content %}
|
15
|
{% if object_list %}
|
16
|
<table id="ressource-list" class="main">
|
17
|
<thead>
|
18
|
<th class="col-id">Identifiant</th>
|
19
|
<th class="col-label">Libellé</th>
|
20
|
<th class="col-action"></th>
|
21
|
</thead>
|
22
|
<tbody>
|
23
|
{% for object in object_list %}
|
24
|
<tr id="ressource-{{ object.pk }}" {% if new_id == object.pk %}class="new-object"{% endif %}>
|
25
|
<td class="col-id">{{object.pk}}</td>
|
26
|
<td class="col-label"><a href="{{ object.pk }}">{{object}}</a></td>
|
27
|
<td class="col-action"><button class="dialog-button delete-object-button"
|
28
|
data-url="{{ object.pk }}/delete/ #form-content">Supprimer</button></td>
|
29
|
</tr>
|
30
|
{% endfor %}
|
31
|
</tbody>
|
32
|
</table>
|
33
|
<script type="text/javascript">$('.new-object').effect('highlight', {}, 3000);</script>
|
34
|
{% else %}
|
35
|
<div class="big-msg-info">
|
36
|
<p>
|
37
|
Cliquez sur le bouton « Ajouter » en haut à droite pour ajouter un
|
38
|
élément.
|
39
|
</p>
|
40
|
</div>
|
41
|
{% endif %}
|
42
|
{% endblock %}
|