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.

61 lines
2.6 KiB

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