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.

34 lines
1.8 KiB

  1. {% macro paginated(entities, title, column) %}
  2. {{ knp_pagination_sortable(entities, title, column) }}
  3. {% if entities.isSorted(column) %}
  4. <span class="badge text-bg-secondary">
  5. {% if entities.params.direction == 'asc' %}
  6. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-sort-alpha-down" viewBox="0 0 16 16">
  7. <path fill-rule="evenodd" d="M10.082 5.629 9.664 7H8.598l1.789-5.332h1.234L13.402 7h-1.12l-.419-1.371zm1.57-.785L11 2.687h-.047l-.652 2.157z"/>
  8. <path d="M12.96 14H9.028v-.691l2.579-3.72v-.054H9.098v-.867h3.785v.691l-2.567 3.72v.054h2.645zM4.5 2.5a.5.5 0 0 0-1 0v9.793l-1.146-1.147a.5.5 0 0 0-.708.708l2 1.999.007.007a.497.497 0 0 0 .7-.006l2-2a.5.5 0 0 0-.707-.708L4.5 12.293z"/>
  9. </svg>
  10. {% endif %}
  11. {% if entities.params.direction == 'desc' %}
  12. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-sort-alpha-down-alt" viewBox="0 0 16 16">
  13. <path d="M12.96 7H9.028v-.691l2.579-3.72v-.054H9.098v-.867h3.785v.691l-2.567 3.72v.054h2.645z"/>
  14. <path fill-rule="evenodd" d="M10.082 12.629 9.664 14H8.598l1.789-5.332h1.234L13.402 14h-1.12l-.419-1.371zm1.57-.785L11 9.688h-.047l-.652 2.156z"/>
  15. <path d="M4.5 2.5a.5.5 0 0 0-1 0v9.793l-1.146-1.147a.5.5 0 0 0-.708.708l2 1.999.007.007a.497.497 0 0 0 .7-.006l2-2a.5.5 0 0 0-.707-.708L4.5 12.293z"/>
  16. </svg>
  17. {% endif %}
  18. </span>
  19. {% endif %}
  20. {% endmacro %}
  21. {% macro map(entity, overpassResult='') %}
  22. <div
  23. id="map"
  24. class="img-fluid img-thumbnail min-vh-50"
  25. data-controller="map"
  26. data-map-geojson-value="{{ geoJsonManager.generateGeoJson(entity)|json_encode }}"
  27. {% if overpassResult is not empty %}
  28. data-map-overpass-result-value="{{ overpassResult }}"
  29. data-map-popup-url-value={{ url('app_map_popup') }}
  30. {% endif %}
  31. data-map-icon-value="{{ asset('images/marker.svg') }}"
  32. ></div>
  33. {% endmacro %}