{% extends 'base.html.twig' %} {% block title %}Miejsca — Admin | TROPO{% endblock %} {% macro osm_actions(id, hidden, featured, q) %}
{% for action, label in {hide: hidden ? 'Pokaż' : 'Ukryj', feature: featured ? 'Nie polecaj' : 'Polecaj'} %}
{% endfor %}
{% endmacro %} {% block body %}
← Dashboard

Miejsca w Przygodzie

Miejsca z OpenStreetMap (odświeżane co miesiąc przyciskami w kolumnie Import) i własne miejsca TROPO. Ukryte miejsca nigdy nie trafią do trasy; polecane mają pierwszeństwo.

{% for type, messages in app.flashes %} {% for m in messages %}
{{ m }}
{% endfor %} {% endfor %}

Import OpenStreetMap

Odświeżaj raz w miesiącu — najstarsze są na górze. Jedno województwo trwa do kilku minut; jeśli się nie uda, zostają poprzednie dane.

{% for r in regions %} {% set stale = r.imported is null or r.imported|date('U') < 'now'|date_modify('-35 days')|date('U') %}
{{ r.name }} {{ r.places }} miejsc · {{ r.imported ? r.imported|date('d.m.Y') : 'nigdy' }}
{% endfor %}

Dodaj miejsce TROPO

{% for r in results %}
{{ types[r.type][1] ?? '' }} {{ r.name }} {{ r.id }} mapa {% if r.hidden %}ukryte{% endif %} {% if r.featured %}polecane{% endif %}
{{ _self.osm_actions(r.id, r.hidden, r.featured, q) }}
{% else %} {% if q %}

Nic nie znaleziono.

{% endif %} {% endfor %}

Własne miejsca TROPO ({{ tropoPlaces|length }})

{% for p in tropoPlaces %}
{{ types[p.type][1] ?? '' }} {{ p.name }}{% if p.featured %} polecane{% endif %}
{% for action, label in {feature: p.featured ? 'Nie polecaj' : 'Polecaj', toggle: p.active ? 'Wyłącz' : 'Włącz', delete: 'Usuń'} %}
{% endfor %}
{% else %}

Brak — dodaj pierwsze miejsce formularzem powyżej.

{% endfor %}

Ukryte i polecane z OSM ({{ overrides|length }})

{% for o in overrides %}
{{ o.name ?? o.osm_id }} {% if o.hidden %}ukryte{% endif %}{% if o.featured %}polecane{% endif %} {{ _self.osm_actions(o.osm_id, o.hidden, o.featured, '') }}
{% else %}

Brak.

{% endfor %}
{% endblock %}