summaryrefslogtreecommitdiff
path: root/resources/views/admin/schedule/load.twig
diff options
context:
space:
mode:
Diffstat (limited to 'resources/views/admin/schedule/load.twig')
-rw-r--r--resources/views/admin/schedule/load.twig79
1 files changed, 79 insertions, 0 deletions
diff --git a/resources/views/admin/schedule/load.twig b/resources/views/admin/schedule/load.twig
new file mode 100644
index 00000000..8c936bec
--- /dev/null
+++ b/resources/views/admin/schedule/load.twig
@@ -0,0 +1,79 @@
+{% extends 'admin/schedule/index.twig' %}
+{% import 'macros/form.twig' as f %}
+
+{% block title %}{{ __('schedule.import.load.title') }}{% endblock %}
+
+{% block row_content %}
+ <form method="POST" action="{{ url('/admin/schedule/import') }}">
+ {{ csrf() }}
+ {{ f.hidden('schedule-url', schedule_url) }}
+ {{ f.hidden('shift-type', shift_type) }}
+ {{ f.hidden('minutes-before', minutes_before) }}
+ {{ f.hidden('minutes-after', minutes_after) }}
+
+ <div class="col-lg-12">
+ <p>{{ __('schedule.import.load.info', [schedule.conference.title, schedule.version]) }}</p>
+
+ <h2>{{ __('schedule.import.rooms.add') }}</h2>
+ {{ _self.roomsTable(rooms.add) }}
+
+ <h2>{{ __('schedule.import.shifts.add') }}</h2>
+ {{ _self.shiftsTable(shifts.add) }}
+
+ <h2>{{ __('schedule.import.shifts.update') }}</h2>
+ {{ _self.shiftsTable(shifts.update) }}
+
+ <h2>{{ __('schedule.import.shifts.delete') }}</h2>
+ {{ _self.shiftsTable(shifts.delete) }}
+
+ {{ f.submit(__('form.import')) }}
+ </div>
+ </form>
+{% endblock %}
+
+
+{% macro roomsTable(rooms) %}
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>{{ __('schedule.import.rooms.name') }}</th>
+ </tr>
+ </thead>
+
+ <tbody>
+ {% for room in rooms %}
+ <tr>
+ <td>{{ room.name }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+{% endmacro %}
+
+{% macro shiftsTable(shifts) %}
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>{{ __('schedule.import.shift.dates') }}</th>
+ <th>{{ __('schedule.import.shift.type') }}</th>
+ <th>{{ __('schedule.import.shift.title') }}</th>
+ <th>{{ __('schedule.import.shift.room') }}</th>
+ </tr>
+ </thead>
+
+ <tbody>
+ {% for shift in shifts %}
+ <tr>
+ <td>{{ shift.date.format(__('Y-m-d H:i')) }} - {{ shift.endDate.format(__('H:i')) }}</td>
+ <td>{{ shift.type }}</td>
+ <td>{{ shift.title }}{% if shift.subtitle %}<br><small>{{ shift.subtitle }}</small>{% endif %}</td>
+ <td>{{ shift.room.name }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+{% endmacro %}