|
|
- {% 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>
- <li class="breadcrumb-item"><a href="{{ path('app_task_show', {'slug': task.slug}) }}">{{ task.name }}</a></li>
- {% endblock %}
-
- {% block page_title %}
- {% include 'partials/_task-title.html.twig' %}
- {% endblock %}
-
- {% block page_content %}
- <div class="row">
- <div class="col mb-3">
- <div class="btn-group">
- <a href="{{ path('app_project_show', {'slug': project.slug}) }}" class="btn btn-secondary">Revenir au projet</a>
- {% if is_granted('IS_AUTHENTICATED_FULLY') %}
- {% if app.user is same as(task.createdBy) %}
- <a href="{{ path('app_task_update', {'slug': task.slug}) }}" class="btn btn-secondary">Modifier la tâche</a>
- <a href="{{ path('app_task_remove', {'slug': task.slug}) }}" target="_blank" class="btn btn-secondary">Supprimer la tâche</a>
- {% endif %}
- {% for transition in workflow_transitions(task) %}
- {% if not workflow_metadata(task, 'locking', task.status) or app.user is same as(task.lockedBy) %}
- <a href="{{ path(workflow_metadata(task, 'route', transition), {'slug': task.slug}) }}" class="btn btn-secondary">{{ workflow_metadata(task, 'title', transition) }}</a>
- {% endif %}
- {% endfor %}
- {% if workflow_metadata(task, 'locking', task.status) and app.user is same as(task.lockedBy) %}
- <div class="btn-group">
- <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
- Télécharger la tâche
- </button>
- <ul class="dropdown-menu">
- <li><a class="dropdown-item" href="{{ path('app_task_geojson', {'slug': task.slug}) }}" target="_blank">GeoJSON</a></li>
- </ul>
- </div>
- <button class="btn btn-secondary" type="button" data-controller="josm" data-action="click->josm#remoteControl" data-josm-importurl-value="{{ url('app_task_osm', {'slug': task.slug}) }}" data-josm-layername-value="{{ task.name }}">Télécommande JOSM</button>
- {% endif %}
- {% endif %}
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col mb-3">
- <p class="text-muted">
- {% include 'partials/_task-metadata.html.twig' %}
- {% include 'partials/_task-locking.html.twig' %}
- </p>
- </div>
- </div>
-
- {% if task.description is not empty %}
- <h2 class="mb-3">Description</h2>
- <div class="row">
- <div class="col mb-3 lead">{{ task.description|markdown_to_html }}</div>
- </div>
- {% endif %}
-
- <h2 class="mb-3">Carte</h2>
- <div class="row">
- <div class="col mb-3">
- {{ macro.map(task) }}
- </div>
- </div>
-
-
- <h2 class="mb-3">Commentaires</h2>
- {% if task.comments is not empty %}
- <div class="row">
- <div class="col mb-3">
- {% for comment in task.comments %}
- <blockquote class="blockquote">
- {{ comment.content|markdown_to_html }}
- </blockquote>
- {% endfor %}
- </div>
- </div>
- {% endif %}
- <div class="row">
- <div class="col mb-3">
- {{ form(commentForm) }}
- </div>
- </div>
- {% endblock %}
|