2024-01-31 19:37:01 +10:00
|
|
|
|
{% extends "base.j2" %}
|
|
|
|
|
|
|
|
|
|
{% block title %}
|
2024-03-07 16:18:21 +10:00
|
|
|
|
Парсинг
|
2024-01-31 19:37:01 +10:00
|
|
|
|
{% endblock title %}
|
|
|
|
|
|
|
|
|
|
{% block main %}
|
2024-03-08 16:39:04 +10:00
|
|
|
|
<form method="post" action="/api/tasks/session/{{ session_id }}" class="container">
|
2024-03-07 16:18:21 +10:00
|
|
|
|
<div class="row">
|
|
|
|
|
<!-- Actions -->
|
|
|
|
|
<section class="col-lg mb-3">
|
|
|
|
|
<div class="separator">
|
2024-03-08 16:39:04 +10:00
|
|
|
|
<div class="d-flex gap-2">
|
|
|
|
|
<h2>Действия</h2>
|
|
|
|
|
<div id="indicator" class="htmx-indicator">
|
|
|
|
|
<div class="spinner-border" role="status">
|
|
|
|
|
<span class="visually-hidden">Loading...</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-03-07 16:18:21 +10:00
|
|
|
|
<hr class="divider">
|
|
|
|
|
</div>
|
|
|
|
|
<nav class="mb-3">
|
|
|
|
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
|
|
|
|
<button class="nav-link active" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#actions-parse-section" type="button" role="tab" aria-controls="actions-parse-section" aria-selected="true">Сбор</button>
|
|
|
|
|
<button class="nav-link" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#actions-add-section" type="button" role="tab" aria-controls="actions-add-section" aria-selected="false">Добавление</button>
|
|
|
|
|
<button class="nav-link" id="nav-profile-tab" data-bs-toggle="tab" data-bs-target="#actions-message-section" type="button" role="tab" aria-controls="actions-message-section" aria-selected="false">Рассылка</button>
|
|
|
|
|
</div>
|
|
|
|
|
</nav>
|
|
|
|
|
<div class="tab-content" id="nav-tabContent">
|
|
|
|
|
|
|
|
|
|
<section class="tab-pane fade show active" id="actions-parse-section">
|
2024-01-31 19:37:01 +10:00
|
|
|
|
<div class="form-floating">
|
2024-03-08 16:39:04 +10:00
|
|
|
|
<input type="text" class="form-control" name="parse" id="group-from-input" placeholder="Группа для парсинга">
|
2024-01-31 19:37:01 +10:00
|
|
|
|
<label for="group-from-input">Группа для парсинга</label>
|
|
|
|
|
</div>
|
2024-03-07 16:18:21 +10:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="tab-pane fade" id="actions-add-section">
|
|
|
|
|
<div class="form-floating">
|
2024-03-10 00:29:44 +10:00
|
|
|
|
<input type="text" name="add" class="form-control" id="group-to-input"
|
2024-03-07 16:18:21 +10:00
|
|
|
|
placeholder="Группа для добавлнеия">
|
|
|
|
|
<label for="group-to-input">Группа для добавления</label>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<section class="tab-pane fade" id="actions-message-section">
|
|
|
|
|
<div class="d-flex flex-column gap-3">
|
|
|
|
|
<div>
|
|
|
|
|
<textarea class="form-control" name="message" rows="8" id="message-textarea"
|
|
|
|
|
placeholder="Напишите здесь своё сообщение"></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="formFile" class="form-label">Выберите изображение</label>
|
|
|
|
|
<input class="form-control" name="file" type="file" id="picture-file-input">
|
|
|
|
|
</div>
|
2024-01-31 19:37:01 +10:00
|
|
|
|
</div>
|
2024-03-07 16:18:21 +10:00
|
|
|
|
</section>
|
2024-01-31 19:37:01 +10:00
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
2024-03-07 16:18:21 +10:00
|
|
|
|
<section class="col-lg mb-3">
|
|
|
|
|
<div class="separator">
|
|
|
|
|
<h2>Настройки</h2>
|
|
|
|
|
<hr class="divider">
|
|
|
|
|
</div>
|
2024-01-31 19:37:01 +10:00
|
|
|
|
|
2024-03-07 16:18:21 +10:00
|
|
|
|
<div class="mb-3 form-floating">
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
class="form-control"
|
2024-03-08 16:39:04 +10:00
|
|
|
|
name="task_name"
|
2024-03-07 16:18:21 +10:00
|
|
|
|
id="task-name-input"
|
|
|
|
|
placeholder="Название задачи"
|
|
|
|
|
>
|
|
|
|
|
<label for="task-name-input">Название задачи</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<section class="d-flex flex-column gap-3 mb-3">
|
2024-03-08 16:39:04 +10:00
|
|
|
|
{% include "collections/collections_section.j2" %}
|
2024-03-07 16:18:21 +10:00
|
|
|
|
</section>
|
2024-03-08 16:39:04 +10:00
|
|
|
|
<button type="submit" hx-post="/api/tasks/session/{{ session_id }}" hx-indicator="#indicator" class="w-100 btn btn-primary">Создать задачу</button>
|
2024-03-07 16:18:21 +10:00
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{% endblock main %}
|
|
|
|
|
|
|
|
|
|
{% block scripts %}
|
|
|
|
|
<script src="{{ url_for('static', filename='frontend/tabs.js') }}"></script>
|
|
|
|
|
{% endblock scripts %}
|