engelsystem/resources/views/admin/schedule/index.twig

64 lines
2.9 KiB
Twig
Raw Normal View History

{% extends 'layouts/app.twig' %}
{% import 'macros/base.twig' as m %}
{% import 'macros/form.twig' as f %}
2023-12-07 15:11:05 +01:00
{% block title %}{{ __('schedule.import.title') }}{% endblock %}
{% block content %}
<div class="container">
2020-11-21 20:54:04 +01:00
<h1>
2023-12-07 15:11:05 +01:00
{% block content_title %}{{ block('title') }}{% endblock %}
2020-11-21 20:54:04 +01:00
{% if is_index|default(false) %}
{{ m.button(m.icon('plus-lg'), url('/admin/schedule/edit'), 'secondary') }}
2020-11-21 20:54:04 +01:00
{% endif %}
</h1>
{% include 'layouts/parts/messages.twig' %}
<div class="row">
{% block row_content %}
2020-11-21 20:54:04 +01:00
<div class="col-md-12">
<p>{{ __('schedule.import.text') }}</p>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{{ __('schedule.name') }}</th>
<th>{{ __('schedule.url') }}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for schedule in schedules %}
<tr>
<td>{{ schedule.name }}</td>
2024-02-18 11:34:47 +01:00
<td><a href="{{ schedule.url }}" target="_blank" rel="noopener">{{ schedule.url }}</a></td>
2020-11-21 20:54:04 +01:00
<td>
2023-12-08 21:25:24 +01:00
<form method="post" action="{{ url('/admin/schedule/edit/' ~ schedule.id) }}">
{{ csrf() }}
<div class="btn-group">
{{ m.button(m.icon('box-arrow-in-down'), url('/admin/schedule/load/' ~ schedule.id), 'secondary', 'sm', __('form.import')) }}
{{ m.button(m.icon('pencil'), url('/admin/schedule/edit/' ~ schedule.id), 'secondary', 'sm', __('form.edit')) }}
{{ f.delete(null, {
'title': __('form.delete'),
'confirm_button_text': __('form.delete'),
'confirm_title': __('schedule.delete.title', [schedule.shifts|length]),
'size': 'sm'
}) }}
</div>
</form>
2020-11-21 20:54:04 +01:00
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
2020-11-21 20:54:04 +01:00
</div>
{% endblock %}
</div>
</div>
{% endblock %}