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.
 
 
 

42 lines
2.1 KiB

{% macro paginated(entities, title, column) %}
{{ knp_pagination_sortable(entities, title, column) }}
{% if entities.isSorted(column) %}
<span class="badge text-bg-secondary">
{% if entities.params.direction == 'asc' %}
<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">
<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"/>
<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"/>
</svg>
{% endif %}
{% if entities.params.direction == 'desc' %}
<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">
<path d="M12.96 7H9.028v-.691l2.579-3.72v-.054H9.098v-.867h3.785v.691l-2.567 3.72v.054h2.645z"/>
<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"/>
<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"/>
</svg>
{% endif %}
</span>
{% endif %}
{% endmacro %}
{% macro map(entity, overpassResult='') %}
<div
id="map"
class="img-fluid img-thumbnail min-vh-50"
data-controller="map"
data-map-geojson-value="{{ geoJsonManager.generateGeoJson(entity)|json_encode }}"
{% if overpassResult is not empty %}
data-map-overpass-result-value="{{ overpassResult }}"
data-map-popup-url-value={{ url('app_map_popup') }}
{% endif %}
data-map-icon-value="{{ asset('images/marker.svg') }}"
></div>
<details>
<summary>Légende</summary>
<span class="badge bg-info">Overpass</span>
{% set stats = taskLifecycleManager.getProjectStats(entity) %}
{% for place, data in stats %}
<span class="badge {{ 'bg-' ~ data.color }}">{{ data.title }}</span>
{% endfor %}
</details>
{% endmacro %}