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.

80 lines
3.3 KiB

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