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.

81 lines
3.4 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 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. {% set dummy = tasks.setParam('_fragment', 'tasks') %}
  47. <div id="tasks" class="row">
  48. <div class="col">
  49. <table class="table table-sm table-hover">
  50. <thead>
  51. <tr>
  52. <th scope="col">{{ macro.paginated(tasks, 'Identifiant', 't.id') }}</th>
  53. <th scope="col">{{ macro.paginated(tasks, 'Nom', 't.name') }}</th>
  54. <th scope="col">{{ macro.paginated(tasks, 'État', 't.status') }}</th>
  55. <th scope="col">{{ macro.paginated(tasks, 'Importance', 't.important') }}</th>
  56. <th scope="col">{{ macro.paginated(tasks, 'Urgence', 't.urgent') }}</th>
  57. </tr>
  58. </thead>
  59. <tbody>
  60. {% for task in tasks %}
  61. <tr class="{{ 'table-' ~ workflow_metadata(task, 'color', task.status) }}">
  62. <th scope="row">{{ task.id }}</th>
  63. <td><a href="{{ path('app_task_show', {'projectSlug': project.slug, 'taskSlug': task.slug}) }}">{{ task.name }}</a></td>
  64. <td>{{ workflow_metadata(task, 'title', task.status) }}</td>
  65. <td>{{ task.important }}</td>
  66. <td>{{ task.urgent }}</td>
  67. </tr>
  68. {% endfor %}
  69. </tbody>
  70. </table>
  71. </div>
  72. </div>
  73. {% endif %}
  74. {% endblock %}