Modification mise en page liste ateliers quand il n'y a pas encore d'ateliers
This commit is contained in:
parent
37c1e24e1a
commit
c0357d6947
|
@ -3,46 +3,51 @@
|
||||||
{% block title %}Atelier index{% endblock %}
|
{% block title %}Atelier index{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h1>Atelier index</h1>
|
<h1>Liste des Ateliers</h1>
|
||||||
|
|
||||||
<table class="table">
|
{% if (ateliers | length) > 0 %}
|
||||||
<thead>
|
<table class="table">
|
||||||
<tr>
|
<thead>
|
||||||
<th scope="row">Id</th>
|
|
||||||
<th scope="col">Nom</th>
|
|
||||||
<th class="" scope="col">Description</th>
|
|
||||||
<th scope="col">Actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for atelier in ateliers %}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ atelier.id }}</td>
|
<th scope="row">Id</th>
|
||||||
<td>{{ atelier.nom }}</td>
|
<th scope="col">Nom</th>
|
||||||
<td>{{ atelier.description | raw }}</td>
|
<th class="" scope="col">Description</th>
|
||||||
<td>
|
<th scope="col">Actions</th>
|
||||||
<div class="d-flex flex-row align-content-end">
|
</tr>
|
||||||
<a class="btn btn-outline-primary m-1"
|
</thead>
|
||||||
href="{{ path('app_atelier_show', {'id': atelier.id}) }}">Afficher</a>
|
<tbody>
|
||||||
{% if app.user and app.user == atelier.instructeur %}
|
{% for atelier in ateliers %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ atelier.id }}</td>
|
||||||
|
<td>{{ atelier.nom }}</td>
|
||||||
|
<td>{{ atelier.description | raw }}</td>
|
||||||
|
<td>
|
||||||
|
<div class="d-flex flex-row align-content-end">
|
||||||
<a class="btn btn-outline-primary m-1"
|
<a class="btn btn-outline-primary m-1"
|
||||||
href="{{ path('app_atelier_edit', {'id': atelier.id}) }}">Modifier</a>
|
href="{{ path('app_atelier_show', {'id': atelier.id}) }}">Afficher</a>
|
||||||
{% else %}
|
{% if app.user and app.user == atelier.instructeur %}
|
||||||
<button class="btn btn-outline-secondary m-1"
|
<a class="btn btn-outline-primary m-1"
|
||||||
href="{{ path('app_atelier_edit', {'id': atelier.id}) }}" disabled>Modifier</button>
|
href="{{ path('app_atelier_edit', {'id': atelier.id}) }}">Modifier</a>
|
||||||
{% endif %}
|
{% else %}
|
||||||
</div>
|
<button class="btn btn-outline-secondary m-1"
|
||||||
</td>
|
href="{{ path('app_atelier_edit', {'id': atelier.id}) }}" disabled>Modifier
|
||||||
</tr>
|
</button>
|
||||||
{% else %}
|
{% endif %}
|
||||||
<tr>
|
</div>
|
||||||
<td colspan="4">no records found</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<a class="btn btn-primary mb-3" href="{{ path('app_atelier_new') }}">Créer atelier</a>
|
<a class="btn btn-primary mb-3" href="{{ path('app_atelier_new') }}">Créer atelier</a>
|
||||||
</div>
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="alert alert-info" role="alert">
|
||||||
|
Il n'y a pas encore d'ateliers. Vous pouvez commencer par <a class="alert-link"
|
||||||
|
href="{{ path('app_atelier_new') }}">en créer
|
||||||
|
un !</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue