|
|
- {% extends 'base.html.twig' %}
- {% import 'macro.html.twig' as macro %}
-
- {% block breadcrumb %}
- <li class="breadcrumb-item"><a href="{{ path('app_project') }}">Projets</a></li>
- <li class="breadcrumb-item"><a href="{{ path('app_project_show', {'slug': project.slug}) }}">{{ project.name }}</a></li>
- {% endblock %}
-
- {% block page_title %}
- {{ project.name }}
- {% for tag in project.tags %}
- <span class="badge text-bg-info ms-2">{{ tag.name }}</span>
- {% endfor %}
- {% endblock %}
-
- {% block page_content %}
- <div class="row">
- <div class="col mb-3">
- <div class="btn-group">
- <a href="{{ path('app_project') }}" class="btn btn-secondary">Revenir aux projets</a>
- {% if is_granted('IS_AUTHENTICATED_FULLY') %}
- {% if app.user is same as(project.createdBy) %}
- <a href="{{ path('app_project_update', {'slug': project.slug}) }}" class="btn btn-secondary">Modifier le projet</a>
- <a href="{{ path('app_project_remove', {'slug': project.slug}) }}" class="btn btn-secondary">Supprimer le projet</a>
- {% endif %}
- <a href="{{ path('app_task_create', {'slug': project.slug}) }}" class="btn btn-secondary">Créer une tâche</a>
- {% endif %}
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col mb-3">
- <p class="text-muted">{% include 'partials/_project-metadata.html.twig' %}</p>
- </div>
- </div>
-
- {% if project.description is not empty %}
- <div class="row">
- <div class="col mb-3 lead">{{ project.description|markdown_to_html }}</div>
- </div>
- {% endif %}
-
- <h2 class="mb-3">Carte</h2>
- <div class="row">
- <div class="col mb-3">
- {{ macro.map(project) }}
- </div>
- </div>
-
- {% if project.tasks is not empty %}
- {% set dummy = tasks.setParam('_fragment', 'tasks') %}
- <h2 id="tasks" class="mb-3">Tâches</h2>
- <div class="row">
- <div class="col mb-3">
- <div class="progress-stacked">
- {% set stats = taskLifecycleManager.getProjectStats(project) %}
- {% for place, data in stats %}
- <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 ~ '%' }}">
- <div class="progress-bar {{ 'bg-' ~ data.color }}">{{ data.percentage|format_number({fraction_digit: 0}) ~ '%' }}</div>
- </div>
- {% endfor %}
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col">
- <table class="table table-sm table-hover">
- <thead>
- <tr>
- <th scope="col">{{ macro.paginated(tasks, 'Nom', 't.name') }}</th>
- <th scope="col">{{ macro.paginated(tasks, 'État', 't.status') }}</th>
- <th scope="col">{{ macro.paginated(tasks, 'Importance', 't.important') }}</th>
- <th scope="col">{{ macro.paginated(tasks, 'Urgence', 't.urgent') }}</th>
- </tr>
- </thead>
- <tbody>
- {% for task in tasks %}
- <tr class="{{ 'table-' ~ workflow_metadata(task, 'color', task.status) }}">
- <td><a href="{{ path('app_task_show', {'slug': task.slug}) }}">{{ task.name }}</a></td>
- <td>{{ workflow_metadata(task, 'title', task.status) }}</td>
- <td>{{ task.important }}</td>
- <td>{{ task.urgent }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- {% endif %}
- {% endblock %}
|