72 lines
2.7 KiB
Twig
72 lines
2.7 KiB
Twig
{% extends 'layouts/app.twig' %}
|
|
{% import 'macros/base.twig' as m %}
|
|
{% import 'macros/form.twig' as f %}
|
|
|
|
{% block title %}{{ __('room.rooms') }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container">
|
|
<h1>
|
|
{{ block('title') }}
|
|
|
|
{% if is_index|default(false) %}
|
|
{{ m.button(m.icon('plus-lg'), url('/admin/rooms/edit'), 'secondary') }}
|
|
{% endif %}
|
|
</h1>
|
|
|
|
{% include 'layouts/parts/messages.twig' %}
|
|
|
|
<div class="row">
|
|
|
|
{% block row_content %}
|
|
<div class="col-md-12">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ __('room.name') }}</th>
|
|
<th>{{ __('room.dect') }}</th>
|
|
<th>{{ __('room.map_url') }}</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{% for room in rooms %}
|
|
<tr>
|
|
<td>
|
|
{{ m.icon('pin-map-fill') }}
|
|
<a href="{{ url('/rooms', {'action': 'view', 'room_id': room.id}) }}">
|
|
{{ room.name }}
|
|
</a>
|
|
</td>
|
|
|
|
<td>{{ m.iconBool(room.dect) }}</td>
|
|
|
|
<td>{{ m.iconBool(room.map_url) }}</td>
|
|
|
|
<td>
|
|
<div class="d-flex ms-auto">
|
|
|
|
{{ m.button(m.icon('pencil'), url('admin/rooms/edit/' ~ room.id), null, 'sm', __('form.edit')) }}
|
|
|
|
<form method="post" class="ps-1">
|
|
{{ csrf() }}
|
|
{{ f.hidden('id', room.id) }}
|
|
{{ f.button(m.icon('trash'), {'title': __('form.delete'), 'name': 'delete', 'type': 'submit', 'btn_type': 'danger', 'size': 'sm'}) }}
|
|
</form>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|