Merge pull request #19 in WFCC/cc34 from 18-affichage-atelier to master
* commit '13346abd0eb71e3b6f952493038642ce778fb188': Changement affichage si eleve ou instructeur dans show Ammelioration apparance show
This commit is contained in:
commit
3dba806953
|
@ -3,46 +3,30 @@
|
|||
{% block title %}Atelier{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Atelier</h1>
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<h1 class="card-title">Atelier : "{{ atelier.nom }}"</h1>
|
||||
<h6 class="card-subtitle mb-2 text-muted">Instructeur : <a href="mailto:{{ atelier.instructeur.email }}"
|
||||
class="card-link">{{ atelier.instructeur.prenom }} {{ atelier.instructeur.nom }}</a>
|
||||
- Moyenne des notes : {{ note }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-text">
|
||||
{{ atelier.description | raw }}
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ atelier.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<td>{{ atelier.nom }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<td>{{ atelier.description | raw }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Email instructeur</th>
|
||||
<td>{{ atelier.instructeur.email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Note</th>
|
||||
<td>
|
||||
{{ note }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Elèves inscrits</th>
|
||||
<td>
|
||||
<ul>
|
||||
{% if is_granted('ROLE_INSTRUCTEUR') %}
|
||||
<details class="card">
|
||||
<summary class="card-header">Eleves inscrits</summary>
|
||||
<ul class="list-group list-group-flush">
|
||||
{% for eleve in eleves %}
|
||||
<li>{{ eleve.prenom }} {{ eleve.nom }} - {{ eleve.email }}</li>
|
||||
<li class="list-group-item">{{ eleve.prenom }} {{ eleve.nom }} - {{ eleve.email }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="d-flex flex-row">
|
||||
</details>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="d-flex flex-row card-footer">
|
||||
{% if app.user and app.user == atelier.instructeur %}
|
||||
<a class="btn btn-outline-primary m-2"
|
||||
href="{{ path('app_atelier_edit', {'id': atelier.id}) }}">Modifier</a>
|
||||
|
@ -51,6 +35,7 @@
|
|||
{% if app.user and app.user == atelier.instructeur %}
|
||||
{{ include('atelier/_delete_form.html.twig') }}
|
||||
{% endif %}
|
||||
{% if is_granted('ROLE_APPRENTI') %}
|
||||
{% if not inscrit %}
|
||||
<form method="post" action="{{ path('app_atelier_inscription', {'id': atelier.id}) }}">
|
||||
<button class="btn btn-outline-success m-2">S'inscrire</button>
|
||||
|
@ -63,5 +48,7 @@
|
|||
<a class="btn btn-outline-primary m-2"
|
||||
href="{{ path('app_atelier_noter', {'id': atelier.id}) }}">Noter</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue