Files
ninedad/templates/home/home.html.twig

38 lines
1.3 KiB
Twig
Raw Normal View History

2025-07-28 17:10:56 +02:00
{% extends 'base.html.twig' %}
2025-08-03 22:42:14 +02:00
2025-07-28 17:10:56 +02:00
{%block body%}
<h2>Projets</h2>
2025-08-05 22:37:43 +02:00
<a href="{{ path('app_user_project_submit') }}" class="btn btn-success mb-3">Ajouter</a>
2025-08-04 21:10:10 +02:00
<div class='d-flex flex-wrap' style='justify-content: left'>
2025-07-28 17:10:56 +02:00
{% for project in projects %}
2025-08-04 21:10:10 +02:00
{% if is_granted('VIEW', project) %}
<div class='card' style='width:300px; margin-right:10px;'>
<div class='card-header d-flex justify-content-between align-items-center'>
2025-08-05 22:37:43 +02:00
<h5>{{project.title}}</h5>
2025-08-03 22:42:14 +02:00
2025-08-05 22:37:43 +02:00
<div>
2025-08-04 22:53:49 +02:00
<a href="{{ path("app_user_project_view",{id:project.id}) }}" class="btn btn-secondary btn-sm"><i class="fas fa-eye"></i></a>
2025-08-04 21:10:10 +02:00
</div>
</div>
<div class='card-body'>
2025-08-05 22:37:43 +02:00
{{project.summary|nl2br}}
</div>
<div class='card-footer'>
2025-08-04 21:10:10 +02:00
<small><em>
2025-08-05 22:37:43 +02:00
<b>Statut</b> = {{ project.status }}<br>
<b>Propriétaires</b> =
2025-08-04 21:10:10 +02:00
{%for user in project.users%}
2025-08-05 22:37:43 +02:00
{{loop.first ? user.username : ' - '~user.username}}
2025-08-04 21:10:10 +02:00
{%endfor%}
</em></small>
</div>
2025-08-03 22:42:14 +02:00
</div>
2025-08-04 21:10:10 +02:00
{% endif %}
2025-07-28 17:10:56 +02:00
{% endfor %}
</div>
{%endblock%}