templates/user_projets/show.html.twig line 1

  1. {% extends 'base.html.twig' %}
  2. {% block title %}UserProjets
  3. {% endblock %}
  4. {% block content %}
  5.     <div class="content">
  6.         <div class="content__project">
  7.             <div class="content__project__top gap-3">
  8.                 <div class="flex items-center justify-between w-full flex-wrap">
  9.                     <div class="flex flex-col text-left max-w-lg">
  10.                         <h1 class="title mb-2">{{ projet.name }}</h1>
  11.                         <div class="flex flex-col lg:flex-row lg:items-center">
  12.                             <a href="{{ path('app_user_show', {'id': userProject.user.id}) }}">
  13.                                 {{ userProject.user.userInfos.name }}
  14.                             </a>
  15.                             <div class="flex items-center lg:ml-4">
  16.                                 {% for i in 1..5 %}
  17.                                     <svg key="{{ i + 64 }}" class="w-4 h-4 {{ i <= ratings ? 'text-yellow-300' : 'text-gray-300' }}" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewbox="0 0 22 20">
  18.                                         <path d="M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z"/>
  19.                                     </svg>
  20.                                 {% endfor %}
  21.                                 <p class="ml-1">
  22.                                     ({{ nbRatings }})
  23.                                 </p>
  24.                             </div>
  25.                         </div>
  26.                     </div>
  27.                     <div class="content__project__top--btn mt-3 mb-3 md:mb-0">
  28.                         <a href="{{path('app_projets_show', {'id' : projet.id})}}" class="btn btn-primary hover:bg-prim-500 w-full md:w-fit">Voir le projet</a>
  29.                         {% if isMine %}
  30.                             <div class="flex grow gap-3">
  31.                                 {% if userProject.Completed %}
  32.                                     <a class="btn btn-closed w-full md:w-fit">
  33.                                         Projet terminé
  34.                                     </a>
  35.                                 {% else %}
  36.                                     {{ include('user_projets/_ending_form.html.twig') }}
  37.                                 {% endif %}
  38.                                 {{ include('user_projets/_delete_form.html.twig') }}
  39.                             </div>
  40.                         {% endif %}
  41.                     </div>
  42.                 </div>
  43.             </div>
  44.             <div class="content__project__mid justify-start md:justify-center mt-">
  45.                 <p class="text-start">
  46.                     {{projet.description}}
  47.                     Lorem ipsum dolor, sit amet consectetur adipisicing elit. At, delectus impedit amet nobis inventore repellendus cum, aperiam totam explicabo possimus ipsum! Doloremque modi consectetur unde corporis repudiandae vero, itaque ipsa!
  48.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Nobis, veniam distinctio cumque autem quasi atque non voluptatibus. Consectetur necessitatibus perferendis aut quas quae sit laudantium consequatur quod quo officia. Porro sapiente distinctio tempora at iste, optio voluptatibus voluptatum.
  49.                 </p>
  50.                 {% if userProject.Completed %}
  51.                     <div class="my-7">
  52.                         <h2 class="title mb-4">Voir le résultat</h2>
  53.                         <a target="_blank" href="{{userProject.github}}" class="btn btn-primary">Clique ici</a>
  54.                     </div>
  55.                 {% endif %}
  56.             </div>
  57.             <div class="content__project__bottom">
  58.                 <div class="mb-1 border-b border-gray-200 dark:border-gray-700">
  59.                     <ul class="flex flex-wrap -mb-px text-sm font-medium text-center" id="myTab" data-tabs-toggle="#myTabContent" role="tablist">
  60.                         {% if userProject.Completed %}
  61.                             <li class="mr-2" role="presentation">
  62.                                 <button class="inline-block py-2 px-4 pl-0 border-b-2 border-transparent rounded-t-lg hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 text-base" id="comment-tab" data-tabs-target="#comment" type="button" role="tab" aria-controls="comment" aria-selected="false">Commentaires</button>
  63.                             </li>
  64.                         {% endif %}
  65.                         <li class="mr-2" role="presentation">
  66.                             <button class="inline-block py-2 px-4 pl-0 border-b-2 border-transparent rounded-t-lg hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 text-base" id="progress-tab" data-tabs-target="#progress" type="button" role="tab" aria-controls="progress" aria-selected="false">Projets en cours</button>
  67.                         </li>
  68.                         <li class="mr-2" role="presentation">
  69.                             <button class="inline-block py-2 px-4 pl-0  border-b-2 border-transparent rounded-t-lg hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 text-base" id="finish-tab" data-tabs-target="#finish" type="button" role="tab" aria-controls="finish" aria-selected="false">Projet Terminés</button>
  70.                         </li>
  71.                     </ul>
  72.                 </div>
  73.                 <div id="myTabContent">
  74.                     {% if userProject.Completed %}
  75.                         <div
  76.                             class="hidden p-0 rounded-lg " id="comment" role="tabpanel" aria-labelledby="comment-tab">
  77.                             {# COMPONENT COMMENTAIRES #}
  78.                             <div class="text-start" {{ react_component('PaginationComments', {'comments': comments, 'admin': is_granted('ROLE_ADMIN') ? true : false} ) }}>
  79.                                 <div role="status">
  80.                                     <svg aria-hidden="true" class="inline w-8 h-8 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-purple-600" viewbox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
  81.                                         <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
  82.                                         <path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
  83.                                     </svg>
  84.                                     <span class="sr-only">Loading...</span>
  85.                                 </div>
  86.                             </div>
  87.                             {{ include('commentaires/_form.html.twig') }}</p>
  88.                     </div>
  89.                 {% endif %}
  90.                 <div class="hidden p-0 rounded-lg" id="progress" role="tabpanel" aria-labelledby="progress-tab">
  91.                     <ul class="flex flex-wrap">
  92.                         {% if allProjects|filter(v => v.Completed == false)|length < 1 %}
  93.                             <p class="text-sm">Aucun projet en cours</p>
  94.                         {% else %}
  95.                             {% for proj in allProjects|filter(v => v.Completed == false) %}
  96.                                 <li>
  97.                                     <a href="{{ path('app_user_projet_show', {'id': proj.id})}}">
  98.                                         <span class="bg-prim-100 text-indigo-800 text-sm font-medium mr-2 px-2.5 py-0.5 rounded dark:bg-gray-700 dark:text-indigo-400 border border-indigo-400">{{proj.user.userInfos.name}}</span>
  99.                                     </a>
  100.                                 </li>
  101.                             {% endfor %}
  102.                         {% endif %}
  103.                     </ul>
  104.                 </div>
  105.                 <div class="hidden p-0 rounded-lg " id="finish" role="tabpanel" aria-labelledby="finish-tab">
  106.                     <ul class="flex flex-wrap">
  107.                         {% if allProjects|filter(v => v.Completed == true)|length < 1 %}
  108.                             <li class="text-sm">Aucun projet terminé</li>
  109.                         {% else %}
  110.                             {% for proj in allProjects|filter(v => v.Completed == true) %}
  111.                                 <li>
  112.                                     <a href="{{ path('app_user_projet_show', {'id': proj.id})}}">
  113.                                         <span class="bg-green-100 text-green-800 whitespace-nowrap text-sm font-medium mr-2 px-2.5 py-0.5 rounded dark:bg-gray-700 dark:text-green-400 border border-green-400">{{proj.user.userInfos.name}}</span>
  114.                                     </a>
  115.                                 </li>
  116.                             {% endfor %}
  117.                         {% endif %}
  118.                     </ul>
  119.                 </div>
  120.             </div>
  121.         </div>
  122.     </div>
  123. </div>{% endblock %}