PIbd-22_Shabunov_O.A._Inter.../admin_panel.html

227 lines
12 KiB
HTML
Raw Normal View History

2023-12-08 00:52:08 +04:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CRUD администрирование</title>
<script type="module" src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.min.css">
<link href="./node_modules/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet" />
<link href="style.css" rel="stylesheet">
</head>
<body class="d-flex flex-column min-vh-100">
<header>
<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark">
<div class="container-md">
<a href="index.html" class="navbar-brand">
<i class="bi bi-film"></i>
<span class="fw-bold text-uppercase ms-2">СигмаТеатр</span>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#main-nav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end align-center" id="main-nav">
<ul class="navbar-nav">
<li class="nav-item me-3">
<a href="index.html#movies" class="nav-link">Фильмы</a>
</li>
<li class="nav-item me-3">
<a href="index.html#series" class="nav-link">Сериалы</a>
</li>
<li class="nav-item me-3">
<a href="about_us.html" class="nav-link">Справка</a>
</li>
<li class="nav-item me-3">
<a href="login.html" class="nav-link">Вход в аккаунт</a>
</li>
<li class="nav-item d-lg-none">
<a href="pricing.html" class="nav-link text-light">Купить подписку</a>
</li>
<li class="nav-item d-none d-lg-inline">
<a href="pricing.html" class="btn btn-light">Купить подписку</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<main>
<section id="movies">
<div class="container-md py-4 mb-4">
<div class="text-center">
<h2>Страница администратора</h2>
<p class="lead text-muted">Выполнение CRUD-операций над фильмами или сериалами</p>
</div>
2023-12-08 00:57:11 +04:00
<button class="btn btn-primary" id="addMovieButton">Добавить запись</button>
2023-12-08 00:52:08 +04:00
<table id="items-table" class="table table-striped">
<thead>
<tr>
<th scope="col"></th>
<th scope="col" class="w-25">Название</th>
<th scope="col" class="w-25">Категория</th>
<th scope="col" class="w-25">Требуется подписка</th>
<th scope="col" class="w-25">Год производства</th>
<th scope="col"></th>
<th scope="col"></th>
2023-12-15 14:22:50 +04:00
</tr>
</thead>
2023-12-08 00:52:08 +04:00
<tbody>
<tr id="line-1">
<th scope="row">1</th>
<td>Американский психопат</td>
<td>Фильм</td>
<td>+</td>
<td>1999</td>
<td><a href="#"><i class="fa-solid fa-pencil"></i></a></td>
<td><a href="#"><i class="fa-solid fa-trash"></i></a></td>
</tr>
<tr id="line-2">
<th scope="row">2</th>
<td>Драйв</td>
<td>Фильм</td>
<td>-</td>
<td>1999</td>
<td><a href="#"><i class="fa-solid fa-pencil"></i></a></td>
<td><a href="#"><i class="fa-solid fa-trash"></i></a></td>
</tr>
<tr id="line-3">
<th scope="row">3</th>
<td>Острые козырьки</td>
<td>Сериал</td>
<td>-</td>
<td>1999</td>
<td><a href="#"><i class="fa-solid fa-pencil"></i></a></td>
<td><a href="#"><i class="fa-solid fa-trash"></i></a></td>
</tr>
</tbody>
</table>
</div>
</section>
</main>
<footer class="py-2 bg-dark text-light mt-auto">
<div class="container-md py-2">
<div class="d-flex flex-wrap justify-content-between align-items-center">
<div>
<div class="download-buttons-container justify-content-start">
<a href="https://play.google.com/store/games?hl=ru&gl=US"><img src="assets/footer/download-buttons/GooglePlay.svg" class="download-button" alt=""></a>
<a href="https://www.huawei.ru/appgallery/"><img src="assets/footer/download-buttons/AppGallery.svg" class="download-button" alt=""></a>
<a href="https://www.apple.com/app-store/"><img src="assets/footer/download-buttons/AppStore.svg" class="download-button" alt=""></a>
</div>
<h6 class="text-secondary mt-3">&copy; 2023 СигмаТеатр</h6>
</div>
<div class="download-buttons-container">
<a href="index.html" class="text-secondary text-decoration-none footer-navigation-button">Главная</a>
<a href="#" class="text-secondary text-decoration-none footer-navigation-button">Политика конфиденциальности</a>
<a href="about_us.html" class="text-secondary text-decoration-none footer-navigation-button">О нас</a>
<a href="admin_panel.html" class="text-secondary text-decoration-none footer-navigation-button">Страница администратора</a>
</div>
</div>
</div>
</footer>
<!-- CRUD modal -->
<div id="items-update" class="modal fade" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog">
<form id="items-form" class="needs-validation" novalidate>
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="items-update-title"></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="text-center">
2023-12-08 00:57:11 +04:00
<img id="image-preview" src="https://via.placeholder.com/200" class="image-preview"
2023-12-08 00:52:08 +04:00
alt="placeholder">
2023-12-08 00:57:11 +04:00
</div>
2023-12-08 00:52:08 +04:00
<input id="items-line-id" type="number" hidden>
2023-12-08 00:57:11 +04:00
2023-12-08 00:52:08 +04:00
<div class="mb-2">
2023-12-08 00:57:11 +04:00
<label for="item" class="form-label">Название</label>
<input id="title" name="title" class="form-control" type="text" required>
</div>
<div class="mb-3">
<label for="type" class="form-label">Тип</label>
<select id="type" class="form-select" required>
<option value="Фильм" selected>Фильм</option>
<option value="Сериал">Сериал</option>
2023-12-08 00:52:08 +04:00
</select>
</div>
2023-12-08 00:57:11 +04:00
<div class="form-check mb-3">
<input type="checkbox" class="form-check-input" id="requiresSubscription">
<label for="requiresSubscription" class="form-check-label">Требуется подписка</label>
</div>
<div class="mb-2">
<label class="form-label" for="image">Постер</label>
<input id="image" type="file" name="image" class="form-control" accept="image/*">
</div>
2023-12-08 00:52:08 +04:00
<div class="mb-2">
2023-12-08 00:57:11 +04:00
<label class="form-label" for="description">Описание</label>
<textarea id="description" class="form-control" style="height: 140px"></textarea>
2023-12-08 00:52:08 +04:00
</div>
<div class="mb-2">
2023-12-08 00:57:11 +04:00
<label class="form-label" for="releaseDate">Год производства</label>
<input id="releaseDate" name="releaseDate" class="form-control" type="number" min="1900" step="1"
2023-12-08 00:52:08 +04:00
required>
</div>
<div class="mb-2">
2023-12-08 00:57:11 +04:00
<label for="country" class="form-label">Страна</label>
<input id="country" name="country" class="form-control" type="text" required>
</div>
<div class="mb-2">
<label for="tagline" class="form-label">Слоган</label>
<input id="tagline" name="tagline" class="form-control" type="text" required>
2023-12-08 00:52:08 +04:00
</div>
2023-12-08 00:57:11 +04:00
<div class="mb-2">
<label for="director" class="form-label">Режиссер</label>
<input id="director" name="director" class="form-control" type="text" required>
</div>
<div class="mb-2">
<label for="ageRating" class="form-label">Возрастное ограничение</label>
2023-12-10 17:47:05 +04:00
<select id="ageRating" class="form-select" required>
<option value="0+" selected>0+</option>
<option value="6+">6+</option>
<option value="12+">12+</option>
<option value="16+">16+</option>
<option value="18+">18+</option>
</select>
2023-12-08 00:57:11 +04:00
</div>
<div class="mb-2">
<label for="video" class="form-label">URL видео</label>
<input id="video" name="video" class="form-control" type="text" required>
</div>
2023-12-08 00:52:08 +04:00
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
<button type="submit" class="btn btn-primary">Сохранить</button>
</div>
</div>
</form>
</div>
</div>
2023-12-08 00:57:11 +04:00
<script type="module">
import validation from "./js/validation";
import { tableModal } from './js/admin_panel.js';
document.addEventListener('DOMContentLoaded', () => {
validation();
tableModal();
});
</script>
2023-12-08 00:52:08 +04:00
</body>
</html>