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.

92 lines
3.6 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
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', {'slug': project.slug}) }}">{{ 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. <div class="btn-group">
  17. <a href="{{ path('app_project') }}" class="btn btn-secondary">Revenir aux projets</a>
  18. {% if is_granted('IS_AUTHENTICATED_FULLY') %}
  19. {% if app.user is same as(project.createdBy) %}
  20. <a href="{{ path('app_project_update', {'slug': project.slug}) }}" class="btn btn-secondary">Modifier le projet</a>
  21. <a href="{{ path('app_project_remove', {'slug': project.slug}) }}" class="btn btn-secondary">Supprimer le projet</a>
  22. {% endif %}
  23. <a href="{{ path('app_task_create', {'slug': project.slug}) }}" class="btn btn-secondary">Créer une tâche</a>
  24. {% endif %}
  25. </div>
  26. </div>
  27. </div>
  28. <div class="row">
  29. <div class="col mb-3">
  30. <p class="text-muted">{% include 'partials/_project-metadata.html.twig' %}</p>
  31. </div>
  32. </div>
  33. {% if project.description is not empty %}
  34. <div class="row">
  35. <div class="col mb-3 lead">{{ project.description|markdown_to_html }}</div>
  36. </div>
  37. {% endif %}
  38. <h2 class="mb-3">Carte</h2>
  39. <div class="row">
  40. <div class="col mb-3">
  41. {{ macro.map(project) }}
  42. </div>
  43. </div>
  44. {% if project.tasks is not empty %}
  45. {% set dummy = tasks.setParam('_fragment', 'tasks') %}
  46. <h2 id="tasks" class="mb-3">Tâches</h2>
  47. <div class="row">
  48. <div class="col mb-3">
  49. <div class="progress-stacked">
  50. {% set stats = taskLifecycleManager.getProjectStats(project) %}
  51. {% for place, data in stats %}
  52. <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 ~ '%' }}">
  53. <div class="progress-bar {{ 'bg-' ~ data.color }}">{{ data.percentage|format_number({fraction_digit: 0}) ~ '%' }}</div>
  54. </div>
  55. {% endfor %}
  56. </div>
  57. </div>
  58. </div>
  59. <div class="row">
  60. <div class="col">
  61. <table class="table table-sm table-hover">
  62. <thead>
  63. <tr>
  64. <th scope="col">{{ macro.paginated(tasks, 'Nom', 't.name') }}</th>
  65. <th scope="col">{{ macro.paginated(tasks, 'État', 't.status') }}</th>
  66. <th scope="col">{{ macro.paginated(tasks, 'Importance', 't.important') }}</th>
  67. <th scope="col">{{ macro.paginated(tasks, 'Urgence', 't.urgent') }}</th>
  68. </tr>
  69. </thead>
  70. <tbody>
  71. {% for task in tasks %}
  72. <tr class="{{ 'table-' ~ workflow_metadata(task, 'color', task.status) }}">
  73. <td><a href="{{ path('app_task_show', {'slug': task.slug}) }}">{{ task.name }}</a></td>
  74. <td>{{ workflow_metadata(task, 'title', task.status) }}</td>
  75. <td>{{ task.important }}</td>
  76. <td>{{ task.urgent }}</td>
  77. </tr>
  78. {% endfor %}
  79. </tbody>
  80. </table>
  81. </div>
  82. </div>
  83. {% endif %}
  84. {% endblock %}