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.

86 lines
3.4 KiB

4 months ago
4 months ago
4 months ago
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', {'slug': project.slug}) }}">{{ project.name }}</a></li>
  6. <li class="breadcrumb-item"><a href="{{ path('app_task_show', {'slug': task.slug}) }}">{{ task.name }}</a></li>
  7. {% endblock %}
  8. {% block page_title %}
  9. {% include 'partials/_task-title.html.twig' %}
  10. {% endblock %}
  11. {% block page_content %}
  12. <div class="row">
  13. <div class="col mb-3">
  14. <div class="btn-group">
  15. <a href="{{ path('app_project_show', {'slug': project.slug}) }}" class="btn btn-secondary">Revenir au projet</a>
  16. {% if is_granted('IS_AUTHENTICATED_FULLY') %}
  17. {% if app.user is same as(task.createdBy) %}
  18. <a href="{{ path('app_task_update', {'slug': task.slug}) }}" class="btn btn-secondary">Modifier la tâche</a>
  19. <a href="{{ path('app_task_remove', {'slug': task.slug}) }}" target="_blank" class="btn btn-secondary">Supprimer la tâche</a>
  20. {% endif %}
  21. {% for transition in workflow_transitions(task) %}
  22. {% if not workflow_metadata(task, 'locking', task.status) or app.user is same as(task.lockedBy) %}
  23. <a href="{{ path(workflow_metadata(task, 'route', transition), {'slug': task.slug}) }}" class="btn btn-secondary">{{ workflow_metadata(task, 'title', transition) }}</a>
  24. {% endif %}
  25. {% endfor %}
  26. {% if workflow_metadata(task, 'locking', task.status) and app.user is same as(task.lockedBy) %}
  27. <div class="btn-group">
  28. <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
  29. Télécharger la tâche
  30. </button>
  31. <ul class="dropdown-menu">
  32. <li><a class="dropdown-item" href="{{ path('app_task_geojson', {'slug': task.slug}) }}" target="_blank">GeoJSON</a></li>
  33. </ul>
  34. </div>
  35. <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>
  36. {% endif %}
  37. {% endif %}
  38. </div>
  39. </div>
  40. </div>
  41. <div class="row">
  42. <div class="col mb-3">
  43. <p class="text-muted">
  44. {% include 'partials/_task-metadata.html.twig' %}
  45. {% include 'partials/_task-locking.html.twig' %}
  46. </p>
  47. </div>
  48. </div>
  49. {% if task.description is not empty %}
  50. <h2 class="mb-3">Description</h2>
  51. <div class="row">
  52. <div class="col mb-3 lead">{{ task.description|markdown_to_html }}</div>
  53. </div>
  54. {% endif %}
  55. <h2 class="mb-3">Carte</h2>
  56. <div class="row">
  57. <div class="col mb-3">
  58. {{ macro.map(task) }}
  59. </div>
  60. </div>
  61. <h2 class="mb-3">Commentaires</h2>
  62. {% if task.comments is not empty %}
  63. <div class="row">
  64. <div class="col mb-3">
  65. {% for comment in task.comments %}
  66. <blockquote class="blockquote">
  67. {{ comment.content|markdown_to_html }}
  68. </blockquote>
  69. {% endfor %}
  70. </div>
  71. </div>
  72. {% endif %}
  73. <div class="row">
  74. <div class="col mb-3">
  75. {{ form(commentForm) }}
  76. </div>
  77. </div>
  78. {% endblock %}