3 Commits

Author SHA1 Message Date
  vincent 3e35e21d70 Ajoute un bonus honteux 10 months ago
  vincent cdaa1bb886 Change l'ordre de tri des projets 10 months ago
  vincent 88907e7c95 Groupe les outils 10 months ago
9 changed files with 205 additions and 56 deletions
Unified View
  1. +12
    -0
      assets/app.js
  2. +10
    -0
      assets/controllers/map_controller.js
  3. +7
    -0
      assets/styles/app.css
  4. +4
    -0
      config/packages/workflow.yaml
  5. +1
    -1
      src/Controller/ProjectController.php
  6. +12
    -14
      src/Repository/ProjectRepository.php
  7. +2
    -0
      templates/macro.html.twig
  8. +64
    -9
      templates/project/show.html.twig
  9. +93
    -32
      templates/task/show.html.twig

+ 12
- 0
assets/app.js View File

@ -18,3 +18,15 @@ document.addEventListener('click', function (event) {
} }
} }
}); });
// /!\ https://wiki.openstreetmap.org/wiki/Google#Google_Maps_terms_of_use
document.addEventListener('keydown', function (event) {
if (event.ctrlKey) {
document.body.classList.add('yolo-balek');
}
}, false);
document.addEventListener('keyup', function (event) {
if (event.key === "Control") {
document.body.classList.remove('yolo-balek');
}
}, false);

+ 10
- 0
assets/controllers/map_controller.js View File

@ -170,4 +170,14 @@ export default class extends Controller {
window.open(url, '_blank'); window.open(url, '_blank');
} }
openInMapillary() {
const url = "https://www.mapillary.com/app/?lat="+this.mapInstance.getCenter().lat+"&lng="+this.mapInstance.getCenter().lng+"&z="+this.mapInstance.getZoom();
window.open(url, '_blank');
}
openInGoogleMaps() {
const url = "https://www.google.com/maps/@"+this.mapInstance.getCenter().lat+","+this.mapInstance.getCenter().lng+","+this.mapInstance.getZoom()+"z";
window.open(url, '_blank');
}
} }

+ 7
- 0
assets/styles/app.css View File

@ -2,3 +2,10 @@
.min-vh-50 { .min-vh-50 {
min-height: 50vh; min-height: 50vh;
} }
.ça-pue-cest-pas-libre {
visibility: hidden;
body.yolo-balek & {
visibility: visible;
}
}

+ 4
- 0
config/packages/workflow.yaml View File

@ -32,6 +32,7 @@ framework:
to: !php/const App\Entity\Task::STATUS_DOING to: !php/const App\Entity\Task::STATUS_DOING
metadata: metadata:
title: 'Commencer la tâche' title: 'Commencer la tâche'
short: 'Commencer'
route: 'app_task_start' route: 'app_task_start'
lock: true lock: true
unlock: false unlock: false
@ -40,6 +41,7 @@ framework:
to: !php/const App\Entity\Task::STATUS_DONE to: !php/const App\Entity\Task::STATUS_DONE
metadata: metadata:
title: 'Terminer la tâche' title: 'Terminer la tâche'
short: 'Terminer'
route: 'app_task_finish' route: 'app_task_finish'
lock: false lock: false
unlock: true unlock: true
@ -48,6 +50,7 @@ framework:
to: !php/const App\Entity\Task::STATUS_TODO to: !php/const App\Entity\Task::STATUS_TODO
metadata: metadata:
title: 'Abandonner la tâche' title: 'Abandonner la tâche'
short: 'Abandonner'
route: 'app_task_cancel' route: 'app_task_cancel'
lock: false lock: false
unlock: true unlock: true
@ -56,6 +59,7 @@ framework:
to: !php/const App\Entity\Task::STATUS_TODO to: !php/const App\Entity\Task::STATUS_TODO
metadata: metadata:
title: 'Recommencer la tâche' title: 'Recommencer la tâche'
short: 'Recommencer'
route: 'app_task_reset' route: 'app_task_reset'
lock: false lock: false
unlock: false unlock: false

+ 1
- 1
src/Controller/ProjectController.php View File

@ -22,7 +22,7 @@ class ProjectController extends AbstractController
#[Route('/', name: 'app_project')] #[Route('/', name: 'app_project')]
public function index(EntityManagerInterface $entityManager): Response public function index(EntityManagerInterface $entityManager): Response
{ {
$projects = $entityManager->getRepository(Project::class)->findAll();
$projects = $entityManager->getRepository(Project::class)->findAllOrderedByActivity();
return $this->render('project/index.html.twig', [ return $this->render('project/index.html.twig', [
'projects' => $projects, 'projects' => $projects,


+ 12
- 14
src/Repository/ProjectRepository.php View File

@ -3,6 +3,7 @@
namespace App\Repository; namespace App\Repository;
use App\Entity\Project; use App\Entity\Project;
use App\Entity\Task;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;
@ -16,20 +17,17 @@ class ProjectRepository extends ServiceEntityRepository
parent::__construct($registry, Project::class); parent::__construct($registry, Project::class);
} }
// /**
// * @return Project[] Returns an array of Project objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('p')
// ->andWhere('p.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('p.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
/**
* @return Project[] Returns an array of Project objects
*/
public function findAllOrderedByActivity(): array
{
return $this->createQueryBuilder('p')
->orderBy('p.createdAt', 'DESC')
->getQuery()
->getResult()
;
}
// public function findOneBySomeField($value): ?Project // public function findOneBySomeField($value): ?Project
// { // {


+ 2
- 0
templates/macro.html.twig View File

@ -56,6 +56,8 @@ Où :
Voir sur Voir sur
<button class="btn btn-sm btn-link" data-action="map#openInOsm">OSM</button> <button class="btn btn-sm btn-link" data-action="map#openInOsm">OSM</button>
<button class="btn btn-sm btn-link" data-action="map#openInPanoramax">Panoramax</button> <button class="btn btn-sm btn-link" data-action="map#openInPanoramax">Panoramax</button>
<button class="btn btn-sm btn-link ça-pue-c’est-pas-libre" data-action="map#openInMapillary">Mapillary</button>
<button class="btn btn-sm btn-link ça-pue-c’est-pas-libre" data-action="map#openInGoogleMaps">Google Maps</button>
</p> </p>
</div> </div>
{% endmacro %} {% endmacro %}


+ 64
- 9
templates/project/show.html.twig View File

@ -16,22 +16,77 @@
{% block page_content %} {% block page_content %}
<div class="row"> <div class="row">
<div class="col mb-3"> <div class="col mb-3">
<div class="btn-group">
<a href="{{ path('app_project') }}" class="btn btn-secondary">Revenir aux projets</a>
<div class="btn-toolbar" role="toolbar">
<div class="btn-group me-2">
<a href="{{ path('app_project') }}" class="btn btn-secondary" title="Revenir aux projets">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-house" viewBox="0 0 16 16">
<path d="M8.707 1.5a1 1 0 0 0-1.414 0L.646 8.146a.5.5 0 0 0 .708.708L2 8.207V13.5A1.5 1.5 0 0 0 3.5 15h9a1.5 1.5 0 0 0 1.5-1.5V8.207l.646.647a.5.5 0 0 0 .708-.708L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293zM13 7.207V13.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V7.207l5-5z"/>
</svg>
Projets
</a>
</div>
{% if is_granted('IS_AUTHENTICATED_FULLY') %} {% if is_granted('IS_AUTHENTICATED_FULLY') %}
{% if app.user is same as(project.createdBy) %} {% 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>
<div class="btn-group me-2">
<a href="{{ path('app_project_update', {'slug': project.slug}) }}" class="btn btn-secondary" title="Modifier le projet">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil" viewBox="0 0 16 16">
<path d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325"/>
</svg>
Modifier
</a>
<a href="{{ path('app_project_remove', {'slug': project.slug}) }}" class="btn btn-secondary" title="Supprimer le projet">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
<path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
<path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
</svg>
Supprimer
</a>
</div>
{% endif %} {% endif %}
{% if project.overpassQuery %} {% if project.overpassQuery %}
<a href="{{ path('app_project_overpass', {'slug': project.slug}) }}" class="btn btn-secondary">Requêter Overpass</a>
<div class="btn-group me-2">
<a href="{{ path('app_project_overpass', {'slug': project.slug}) }}" class="btn btn-secondary" title="Requêter Overpass">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-clockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2z"/>
<path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466"/>
</svg>
Overpass
</a>
</div>
{% endif %} {% endif %}
<button type="button" class="btn btn-secondary" data-bs-toggle="modal" data-bs-target="#modal">Importer des tâches</button>
<a href="{{ path('app_task_csv', {'slug': project.slug}) }}" class="btn btn-secondary">Exporter les tâches</a>
<a href="{{ path('app_task_create', {'slug': project.slug}) }}" class="btn btn-secondary">Créer une tâche</a>
<div class="btn-group me-2">
<button type="button" class="btn btn-secondary" data-bs-toggle="modal" data-bs-target="#modal" title="Importer des tâches">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-file-earmark-arrow-down" viewBox="0 0 16 16">
<path d="M8.5 6.5a.5.5 0 0 0-1 0v3.793L6.354 9.146a.5.5 0 1 0-.708.708l2 2a.5.5 0 0 0 .708 0l2-2a.5.5 0 0 0-.708-.708L8.5 10.293z"/>
<path d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2M9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5z"/>
</svg>
Importer
</button>
<a href="{{ path('app_task_csv', {'slug': project.slug}) }}" class="btn btn-secondary" title="Exporter les tâches">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-file-earmark-arrow-up" viewBox="0 0 16 16">
<path d="M8.5 11.5a.5.5 0 0 1-1 0V7.707L6.354 8.854a.5.5 0 1 1-.708-.708l2-2a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 7.707z"/>
<path d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2M9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5z"/>
</svg>
Exporter
</a>
<a href="{{ path('app_task_create', {'slug': project.slug}) }}" class="btn btn-secondary" title="Créer une tâche">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus" viewBox="0 0 16 16">
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4"/>
</svg>
Créer
</a>
</div>
{% endif %} {% endif %}
{% if randomTask %} {% if randomTask %}
<a href="{{ path('app_task_show', {'slug': randomTask.slug}) }}" class="btn btn-secondary">Piocher une tâche</a>
<div class="btn-group">
<a href="{{ path('app_task_show', {'slug': randomTask.slug}) }}" class="btn btn-secondary" title="Piocher une tâche">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-shuffle" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M0 3.5A.5.5 0 0 1 .5 3H1c2.202 0 3.827 1.24 4.874 2.418.49.552.865 1.102 1.126 1.532.26-.43.636-.98 1.126-1.532C9.173 4.24 10.798 3 13 3v1c-1.798 0-3.173 1.01-4.126 2.082A9.6 9.6 0 0 0 7.556 8a9.6 9.6 0 0 0 1.317 1.918C9.828 10.99 11.204 12 13 12v1c-2.202 0-3.827-1.24-4.874-2.418A10.6 10.6 0 0 1 7 9.05c-.26.43-.636.98-1.126 1.532C4.827 11.76 3.202 13 1 13H.5a.5.5 0 0 1 0-1H1c1.798 0 3.173-1.01 4.126-2.082A9.6 9.6 0 0 0 6.444 8a9.6 9.6 0 0 0-1.317-1.918C4.172 5.01 2.796 4 1 4H.5a.5.5 0 0 1-.5-.5"/>
<path d="M13 5.466V1.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384l-2.36 1.966a.25.25 0 0 1-.41-.192m0 9v-3.932a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384l-2.36 1.966a.25.25 0 0 1-.41-.192"/>
</svg>
Piocher
</a>
</div>
{% endif %} {% endif %}
</div> </div>
</div> </div>


+ 93
- 32
templates/task/show.html.twig View File

@ -14,40 +14,101 @@
{% block page_content %} {% block page_content %}
<div class="row"> <div class="row">
<div class="col mb-3"> <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
<div class="btn-toolbar" role="toolbar">
<div class="btn-group me-2">
<a href="{{ path('app_project_show', {'slug': project.slug}) }}" class="btn btn-secondary" title="Revenir au projet">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-house" viewBox="0 0 16 16">
<path d="M8.707 1.5a1 1 0 0 0-1.414 0L.646 8.146a.5.5 0 0 0 .708.708L2 8.207V13.5A1.5 1.5 0 0 0 3.5 15h9a1.5 1.5 0 0 0 1.5-1.5V8.207l.646.647a.5.5 0 0 0 .708-.708L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293zM13 7.207V13.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V7.207l5-5z"/>
</svg>
Projet
</a>
</div>
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
{% if app.user is same as(task.createdBy) %}
<div class="btn-group me-2">
<a href="{{ path('app_task_update', {'slug': task.slug}) }}" class="btn btn-secondary" title="Modifier la tâche">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil" viewBox="0 0 16 16">
<path d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325"/>
</svg>
Modifier
</a>
<a href="{{ path('app_task_remove', {'slug': task.slug}) }}" target="_blank" class="btn btn-secondary" title="Supprimer la tâche">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
<path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
<path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
</svg>
Supprimer
</a>
</div>
{% endif %}
<div class="btn-group me-2">
{% 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" title="{{ workflow_metadata(task, 'title', transition) }}">
{% if transition.name == 'start' %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">
<path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393"/>
</svg>
{% elseif transition.name == 'finish' %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-stop-fill" viewBox="0 0 16 16">
<path d="M5 3.5h6A1.5 1.5 0 0 1 12.5 5v6a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 11V5A1.5 1.5 0 0 1 5 3.5"/>
</svg>
{% elseif transition.name == 'cancel' %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-skip-backward-fill" viewBox="0 0 16 16">
<path d="M.5 3.5A.5.5 0 0 0 0 4v8a.5.5 0 0 0 1 0V8.753l6.267 3.636c.54.313 1.233-.066 1.233-.697v-2.94l6.267 3.636c.54.314 1.233-.065 1.233-.696V4.308c0-.63-.693-1.01-1.233-.696L8.5 7.248v-2.94c0-.63-.692-1.01-1.233-.696L1 7.248V4a.5.5 0 0 0-.5-.5"/>
</svg>
{% elseif transition.name == 'reset' %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-skip-backward-fill" viewBox="0 0 16 16">
<path d="M.5 3.5A.5.5 0 0 0 0 4v8a.5.5 0 0 0 1 0V8.753l6.267 3.636c.54.313 1.233-.066 1.233-.697v-2.94l6.267 3.636c.54.314 1.233-.065 1.233-.696V4.308c0-.63-.693-1.01-1.233-.696L8.5 7.248v-2.94c0-.63-.692-1.01-1.233-.696L1 7.248V4a.5.5 0 0 0-.5-.5"/>
</svg>
{% endif %}
{{ workflow_metadata(task, 'short', transition) }}
</a>
{% endif %}
{% endfor %}
</div>
<div class="btn-group me-2">
{% 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" title="Télécharger la tâche">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-download" viewBox="0 0 16 16">
<path d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5"/>
<path d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708z"/>
</svg>
Télécharger
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="{{ path('app_task_geojson', {'slug': task.slug}) }}">.geojson</a></li>
<li><a class="dropdown-item" href="{{ path('app_task_gpx', {'slug': task.slug}) }}">.gpx</a></li>
</ul>
</div>
<button
class="btn btn-secondary"
type="button"
data-controller="josm"
data-action="click->josm#remoteControl"
data-josm-commands-value="{{ josmCommands|escape('html_attr') }}"
title="Télécommande JOSM"
>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-broadcast" viewBox="0 0 16 16">
<path d="M3.05 3.05a7 7 0 0 0 0 9.9.5.5 0 0 1-.707.707 8 8 0 0 1 0-11.314.5.5 0 0 1 .707.707m2.122 2.122a4 4 0 0 0 0 5.656.5.5 0 1 1-.708.708 5 5 0 0 1 0-7.072.5.5 0 0 1 .708.708m5.656-.708a.5.5 0 0 1 .708 0 5 5 0 0 1 0 7.072.5.5 0 1 1-.708-.708 4 4 0 0 0 0-5.656.5.5 0 0 1 0-.708m2.122-2.12a.5.5 0 0 1 .707 0 8 8 0 0 1 0 11.313.5.5 0 0 1-.707-.707 7 7 0 0 0 0-9.9.5.5 0 0 1 0-.707zM10 8a2 2 0 1 1-4 0 2 2 0 0 1 4 0"/>
</svg>
JOSM
</button> </button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="{{ path('app_task_geojson', {'slug': task.slug}) }}">.geojson</a></li>
<li><a class="dropdown-item" href="{{ path('app_task_gpx', {'slug': task.slug}) }}">.gpx</a></li>
</ul>
{% endif %}
{% endif %}
</div>
<div class="btn-group me-2">
{% if randomTask %}
<a href="{{ path('app_task_show', {'slug': randomTask.slug}) }}" class="btn btn-secondary" title="Piocher une tâche">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-shuffle" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M0 3.5A.5.5 0 0 1 .5 3H1c2.202 0 3.827 1.24 4.874 2.418.49.552.865 1.102 1.126 1.532.26-.43.636-.98 1.126-1.532C9.173 4.24 10.798 3 13 3v1c-1.798 0-3.173 1.01-4.126 2.082A9.6 9.6 0 0 0 7.556 8a9.6 9.6 0 0 0 1.317 1.918C9.828 10.99 11.204 12 13 12v1c-2.202 0-3.827-1.24-4.874-2.418A10.6 10.6 0 0 1 7 9.05c-.26.43-.636.98-1.126 1.532C4.827 11.76 3.202 13 1 13H.5a.5.5 0 0 1 0-1H1c1.798 0 3.173-1.01 4.126-2.082A9.6 9.6 0 0 0 6.444 8a9.6 9.6 0 0 0-1.317-1.918C4.172 5.01 2.796 4 1 4H.5a.5.5 0 0 1-.5-.5"/>
<path d="M13 5.466V1.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384l-2.36 1.966a.25.25 0 0 1-.41-.192m0 9v-3.932a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384l-2.36 1.966a.25.25 0 0 1-.41-.192"/>
</svg>
Piocher
</a>
{% endif %}
</div> </div>
<button
class="btn btn-secondary"
type="button"
data-controller="josm"
data-action="click->josm#remoteControl"
data-josm-commands-value="{{ josmCommands|escape('html_attr') }}"
>Télécommande JOSM</button>
{% endif %}
{% endif %}
{% if randomTask %}
<a href="{{ path('app_task_show', {'slug': randomTask.slug}) }}" class="btn btn-secondary">Piocher une tâche</a>
{% endif %}
</div> </div>
</div> </div>
</div> </div>


Loading…
Cancel
Save