Réalisation finale
This commit is contained in:
52
templates/contribution/index.html.twig
Normal file
52
templates/contribution/index.html.twig
Normal file
@@ -0,0 +1,52 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Contributions{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1>Contributions</h1>
|
||||
<a href="{{ path('app_contribution_new') }}" class="btn btn-success">
|
||||
<i class="fas fa-plus"></i> Nouvelle Contribution
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Membre</th>
|
||||
<th>Projet</th>
|
||||
<th>Date</th>
|
||||
<th>Durée</th>
|
||||
<th>Commentaire</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for contribution in contributions %}
|
||||
<tr>
|
||||
<td>{{ contribution.id }}</td>
|
||||
<td>{{ contribution.membre }}</td>
|
||||
<td>{{ contribution.projet.nom }}</td>
|
||||
<td>{{ contribution.dateContribution|date('d/m/Y') }}</td>
|
||||
<td>{{ contribution.dureeFormatee }}</td>
|
||||
<td>{{ contribution.commentaire|default('')|slice(0, 50) }}{% if contribution.commentaire|length > 50 %}...{% endif %}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_contribution_show', {'id': contribution.id}) }}" class="btn btn-sm btn-info">
|
||||
<i class="fas fa-eye"></i> Voir
|
||||
</a>
|
||||
<a href="{{ path('app_contribution_edit', {'id': contribution.id}) }}" class="btn btn-sm btn-warning">
|
||||
<i class="fas fa-edit"></i> Modifier
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="7" class="text-center">Aucune contribution trouvée</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user