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

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

{% include 'layouts/parts/messages.twig' %}
{% block row_content %}
{% for room in rooms %} {% endfor %}
{{ __('general.name') }} {{ __('general.dect') }} {{ __('room.map_url') }}
{{ m.icon('pin-map-fill') }} {{ room.name }} {{ m.iconBool(room.dect) }} {{ m.iconBool(room.map_url) }}
{{ m.button(m.icon('pencil'), url('admin/rooms/edit/' ~ room.id), null, 'sm', __('form.edit')) }}
{{ csrf() }} {{ f.hidden('id', room.id) }} {{ f.button(m.icon('trash'), {'title': __('form.delete'), 'name': 'delete', 'type': 'submit', 'btn_type': 'danger', 'size': 'sm'}) }}
{% endblock %}
{% endblock %}