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.

60 lines
2.7 KiB

4 months ago
  1. {% extends 'base.html.twig' %}
  2. {% block breadcrumb %}
  3. <li class="breadcrumb-item"><a href="{{ path('app_project') }}">Projets</a></li>
  4. <li class="breadcrumb-item"><a href="{{ path('app_project_show', {'projectSlug': project.slug}) }}">Projet {{ project.name }}</a></li>
  5. <li class="breadcrumb-item"><a href="{{ path('app_task_show', {'projectSlug': project.slug, 'taskSlug': task.slug}) }}">Tâche {{ task.name }}</a></li>
  6. {% endblock %}
  7. {% block page_title %}
  8. {{ task.name }}
  9. <span class="badge {{ 'text-bg-' ~ workflow_metadata(task, 'color', task.status) }} ms-2">{{ workflow_metadata(task, 'title', task.status) }}</span>
  10. {% endblock %}
  11. {% block page_content %}
  12. <div class="row">
  13. <div class="col mb-3">
  14. <a href="{{ path('app_project_show', {'projectSlug': project.slug}) }}" class="btn btn-primary">Revenir au projet</a>
  15. <a href="{{ path('app_task_update', {'projectSlug': project.slug, 'taskSlug': task.slug}) }}" class="btn btn-primary">Modifier la tâche</a>
  16. <a href="{{ path('app_task_remove', {'projectSlug': project.slug, 'taskSlug': task.slug}) }}" target="_blank" class="btn btn-primary">Supprimer la tâche</a>
  17. <a href="{{ path('app_task_geojson', {'slug': task.slug}) }}" target="_blank" class="btn btn-primary">Télécharger GeoJSON</a>
  18. {% for transition in workflow_transitions(task) %}
  19. <a href="{{ path(workflow_metadata(task, 'route', transition), {'projectSlug': project.slug, 'taskSlug': task.slug}) }}" class="btn btn-primary">{{ workflow_metadata(task, 'title', transition) }}</a>
  20. {% endfor %}
  21. <button class="btn btn-primary" 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>
  22. </div>
  23. </div>
  24. {% if task.description is not empty %}
  25. <h2 class="mb-3">Description</h2>
  26. <div class="row">
  27. <div class="col mb-3 lead">{{ task.description|markdown_to_html }}</div>
  28. </div>
  29. {% endif %}
  30. <h2 class="mb-3">Carte</h2>
  31. <div class="row">
  32. <div class="col mb-3">
  33. <div id="map" class="img-fluid img-thumbnail min-vh-50" data-controller="map" data-map-geojson-value="{{ geoJsonManager.generateGeoJson(task)|json_encode }}"></div>
  34. </div>
  35. </div>
  36. <h2 class="mb-3">Commentaires</h2>
  37. {% if task.comments is not empty %}
  38. <div class="row">
  39. <div class="col mb-3">
  40. {% for comment in task.comments %}
  41. <blockquote class="blockquote">
  42. {{ comment.content|markdown_to_html }}
  43. </blockquote>
  44. {% endfor %}
  45. </div>
  46. </div>
  47. {% endif %}
  48. <div class="row">
  49. <div class="col mb-3">
  50. {{ form(commentForm) }}
  51. </div>
  52. </div>
  53. {% endblock %}