templates/user_projets/list_projects_by.html.twig line 1
{% extends 'base.html.twig' %}{% block title %}Projets d'utilisateurs{% endblock %}{% block content %}<div class="content"><div class="content__base"><div class="flex flex-wrap flex-col justify-center gap-4 text-start"><h1 class="title">{{title}}</h1><div class="flex flex-wrap gap-6 rounded-lg">{% if projects|length > 0 %}{% for project in projects|reverse() %}<div class="flex flex-col max-w-md w-72 h-fit md:h-96 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700 grow hover:bg-slate-50">{% set firstImageSlider = project.projet.getImageSliders|first %}{% if firstImageSlider %}{% if firstImageSlider.getUrl starts with 'http' %}<img class="rounded-t-lg h-60 w-full object-cover" src=" {{ firstImageSlider.getUrl }} " alt=" image de slider">{% else %}<img class="rounded-t-lg h-60 w-full object-cover" src=" {{ asset('uploads/SliderImages/' ~ firstImageSlider.getUrl) }} " alt=" image de slider">{% endif %}{% else %}<img class="rounded-t-lg h-60 w-full object-cover" src=" {{ asset('uploads/SliderImages/default-image.png') }} " alt=" image par défaut">{% endif %}<divclass="p-4 flex flex-col h-full gap-2">{# PROJECT NAME AND USER #}<div class="flex flex-col"><h5 class="text-xl font-bold tracking-tight text-gray-800 dark:text-white mb-1">{{ project.projet.name }}</h5><p class="mb-2">{{project.User.UserInfos.name}}</p></div><p class="flex gap-2 font-normal text-gray-700 dark:text-gray-400 mb-1"><svg class="w-6 h-6 text-green-400 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 20 20"><path stroke="currentColor" stroke-linejoin="round" stroke-width="2" d="M10 6v4l3.276 3.276M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/></svg>{{ project.createdAt|date('d/m H:i') }}</p>{% if project.Completed %}<p class="flex gap-2 font-normal text-gray-700 dark:text-gray-400 mb-2"><svg class="w-6 h-6 text-red-400 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 20 20"><path stroke="currentColor" stroke-linejoin="round" stroke-width="2" d="M10 6v4l3.276 3.276M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/></svg>{{ project.finishedAt|date('d/m H:i') }}</p>{% endif %}<a href="{{ path('app_user_projet_show', {'id': project.id})}}" class="inline-flex justify-between items-center px-3 py-2 text-sm font-medium text-center text-white bg-purple-400 rounded-lg hover:bg-purple-600 focus:ring-4 focus:outline-none focus:ring-purple-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-800 mt-auto">Voir plus...<svg class="w-3.5 h-3.5 ml-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 14 10"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/></svg></a></div></div>{% endfor %}{% else %}<p>Aucun Projet</p>{% endif %}</div></div></div></div>{% endblock %}