PaperParser/app/blueprints/frontend/templates/parse.j2

97 lines
4.8 KiB
Django/Jinja
Raw 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.j2" %}
{% block title %}
Парсинг
{% endblock title %}
{% block main %}
<form method="post" action="/api/tasks/session/{{ session_id }}" class="container">
<div class="row">
<!-- Actions -->
<section class="col-lg mb-3">
<div class="separator">
<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>
<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">
<div class="form-floating mb-3">
<input type="text" class="form-control" name="parse" id="group-from-input" placeholder="Группа для парсинга">
<label for="group-from-input">Группа для парсинга</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="parse-bio-check" id="parse-bio-check">
<label class="form-check-label" for="parse-bio-check">
Парсить с описанием?
</label>
</div>
</section>
<section class="tab-pane fade" id="actions-add-section">
<div class="form-floating">
<input type="text" name="add" class="form-control" id="group-to-input"
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>
</div>
</section>
</div>
</section>
<section class="col-lg mb-3">
<div class="separator">
<h2>Настройки</h2>
<hr class="divider">
</div>
<div class="mb-3 form-floating">
<input
type="text"
class="form-control"
name="task_name"
id="task-name-input"
placeholder="Название задачи"
>
<label for="task-name-input">Название задачи</label>
</div>
<section class="d-flex flex-column gap-3 mb-3">
{% include "collections/collections_section.j2" %}
</section>
<button type="submit" hx-post="/api/tasks/session/{{ session_id }}" hx-indicator="#indicator" class="w-100 btn btn-primary">Создать задачу</button>
</section>
</div>
</form>
{% endblock main %}
{% block scripts %}
<script src="{{ url_for('static', filename='frontend/tabs.js') }}"></script>
{% endblock scripts %}