You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
3.2 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. {% extends 'base.html.twig' %}
  2. {% block breadcrumb %}
  3. <li class="breadcrumb-item"><a href="{{ path('app_project') }}">Projets</a></li>
  4. <li class="breadcrumb-item"><a href="{{ path('app_project_show', {'projectSlug': project.slug}) }}">Projet {{ project.name }}</a></li>
  5. {% endblock %}
  6. {% block page_title %}
  7. {{ project.name }}
  8. {% for tag in project.tags %}
  9. <span class="badge text-bg-info ms-2">{{ tag.name }}</span>
  10. {% endfor %}
  11. {% endblock %}
  12. {% block page_content %}
  13. <div class="row">
  14. <div class="col mb-3">
  15. <a href="{{ path('app_project') }}" class="btn btn-primary">Revenir aux projets</a>
  16. <a href="{{ path('app_project_update', {'projectSlug': project.slug}) }}" class="btn btn-primary">Modifier le projet</a>
  17. <a href="{{ path('app_project_remove', {'projectSlug': project.slug}) }}" class="btn btn-primary">Supprimer le projet</a>
  18. <a href="{{ path('app_task_create', {'projectSlug': project.slug}) }}" class="btn btn-primary">Créer une tâche</a>
  19. </div>
  20. </div>
  21. {% if project.description is not empty %}
  22. <div class="row">
  23. <div class="col mb-3 lead">{{ project.description|markdown_to_html }}</div>
  24. </div>
  25. {% endif %}
  26. <h2 class="mb-3">Carte</h2>
  27. <div class="row">
  28. <div class="col mb-3">
  29. <div id="map" class="img-fluid img-thumbnail min-vh-50" data-controller="map" data-map-geojson-value="{{ geoJsonManager.generateGeoJson(project)|json_encode }}"></div>
  30. </div>
  31. </div>
  32. {% if project.tasks is not empty %}
  33. <div class="row">
  34. <div class="col mb-3">
  35. <div class="progress-stacked">
  36. {% set stats = taskLifecycleManager.getProjectStats(project) %}
  37. {% for place, data in stats %}
  38. <div class="progress" role="progressbar" data-bs-toggle="tooltip" data-bs-title="{{ data.title }} {{ data.value ~ '/' ~ data.max }}" aria-label="{{ data.title }}" aria-valuenow="{{ data.value }}" aria-valuemin="0" aria-valuemax="{{ data.max }}" style="width:{{ data.percentage ~ '%' }}">
  39. <div class="progress-bar {{ 'bg-' ~ data.color }}">{{ data.percentage|format_number({fraction_digit: 0}) ~ '%' }}</div>
  40. </div>
  41. {% endfor %}
  42. </div>
  43. </div>
  44. </div>
  45. <div class="row">
  46. <div class="col">
  47. <table class="table table-sm table-hover">
  48. <thead>
  49. <tr>
  50. <th scope="col">Identifiant</th>
  51. <th scope="col">Nom</th>
  52. <th scope="col">État</th>
  53. <th scope="col">Importance</th>
  54. <th scope="col">Urgence</th>
  55. </tr>
  56. </thead>
  57. <tbody>
  58. {% for task in project.tasks %}
  59. <tr class="{{ 'table-' ~ workflow_metadata(task, 'color', task.status) }}">
  60. <th scope="row">{{ task.id }}</th>
  61. <td><a href="{{ path('app_task_show', {'projectSlug': project.slug, 'taskSlug': task.slug}) }}">{{ task.name }}</a></td>
  62. <td>{{ workflow_metadata(task, 'title', task.status) }}</td>
  63. <td>{{ task.important }}</td>
  64. <td>{{ task.urgent }}</td>
  65. </tr>
  66. {% endfor %}
  67. </tbody>
  68. </table>
  69. </div>
  70. </div>
  71. {% endif %}
  72. {% endblock %}