morozovka-portal/app/templates/admin_schedule_import.html

43 lines
2.5 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block title %}Импорт расписания — Morozovka Portal{% endblock %}
{% block main_class %}container container-narrow{% endblock %}
{% block head %}
<style>
.card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 30px; margin-top: 20px; }
.upload-area { border: 2px dashed #30363d; border-radius: 8px; padding: 40px; text-align: center; margin-bottom: 20px; transition: border-color 0.2s; }
.upload-area:hover { border-color: #58a6ff; }
input[type="file"] { display: none; }
.btn-file { display: inline-block; padding: 10px 20px; background: #21262d; color: white; border: 1px solid #30363d; border-radius: 5px; cursor: pointer; font-weight: bold; }
.btn-file:hover { background: #30363d; }
button[type="submit"] { width: 100%; padding: 12px; background: #238636; color: white; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; font-size: 1rem; }
button[type="submit"]:hover { background: #2ea043; }
.hint { color: #8b949e; font-size: 0.85rem; margin-top: 15px; line-height: 1.5; }
</style>
{% endblock %}
{% block content %}
<a href="/admin/schedule" style="display:inline-block;margin-bottom:20px;color:#8b949e;text-decoration:none;">← Назад к расписанию</a>
<h2 class="page-title">Импорт расписания</h2>
<div class="card">
<form action="/admin/schedule/import" method="POST" enctype="multipart/form-data">
<div class="upload-area">
<label for="file-upload" class="btn-file">Выбрать .ics файл</label>
<input id="file-upload" type="file" name="file" accept=".ics" required onchange="document.getElementById('file-name').textContent = this.files[0].name">
<p id="file-name" style="margin-top: 15px; color: #3fb950;">Файл не выбран</p>
</div>
<button type="submit">Загрузить и импортировать</button>
</form>
<div class="hint">
<b>Как выгрузить расписание из Google Calendar?</b><br>
1. Зайдите в Google Calendar на компьютере.<br>
2. Нажмите на три точки рядом с нужным календарем.<br>
3. Выберите «Настройки и общий доступ».<br>
4. Прокрутите вниз до раздела «Экспорт календаря» и скачайте ZIP-архив.<br>
5. Распакуйте архив и загрузите сюда файл с расширением .ics.
</div>
</div>
{% endblock %}