{% extends 'layouts/app.twig' %} {% import 'macros/base.twig' as m %} {% import 'macros/form.twig' as f %} {% block title %}{{ __('location.locations') }}{% endblock %} {% block content %}

{% if not is_index|default(false) %} {{ m.button(m.icon('chevron-left'), location ? url('/locations', {'action': 'view', 'location_id': location.id}) : url('/admin/locations'), 'secondary', 'sm', __('general.back')) }} {% endif %} {{ block('title') }} {% if is_index|default(false) %} {{ m.button(m.icon('plus-lg'), url('/admin/locations/edit'), 'secondary') }} {% endif %}

{% include 'layouts/parts/messages.twig' %}
{% block row_content %}
{% for location in locations %} {% endfor %}
{{ __('general.name') }} {{ __('general.dect') }} {{ __('location.map_url') }} {{ __('general.shifts') }}
{{ m.icon('pin-map-fill') }} {{ location.name }} {{ m.iconBool(location.dect) }} {{ m.iconBool(location.map_url) }} {{ m.iconBool(location.shifts.count) }}
{{ m.button(m.icon('pencil'), url('/admin/locations/edit/' ~ location.id), null, 'sm', __('form.edit')) }}
{{ csrf() }} {{ f.hidden('id', location.id) }} {{ f.delete(null, { 'size': 'sm', 'confirm_title': __('location.delete.title', [location.name|e]), 'confirm_button_text': __('form.delete'), }) }}
{% endblock %}
{% endblock %}