mirror of
https://github.com/claradex/nativegallery.git
synced 2024-11-15 03:31:10 +03:00
entities pages
This commit is contained in:
parent
836f01a5e4
commit
a0cbb5b318
2 changed files with 96 additions and 0 deletions
|
@ -0,0 +1,45 @@
|
||||||
|
<?php
|
||||||
|
use App\Services\{Router, Auth};
|
||||||
|
|
||||||
|
$user = new \App\Models\User(Auth::userid());
|
||||||
|
|
||||||
|
if (!isset($_GET['type']) || $_GET['type'] != 'Photo') {
|
||||||
|
if ($user->i('admin') === 2) {
|
||||||
|
header('Location: ?type=Photo');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ru">
|
||||||
|
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
|
||||||
|
<link rel="stylesheet" href="/static/css/notie.css<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>">
|
||||||
|
<script src="/static/js/notie.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
notie.setOptions({
|
||||||
|
transitionCurve: 'cubic-bezier(0.2, 0, 0.2, 1)'
|
||||||
|
});
|
||||||
|
var Notify = {
|
||||||
|
noty: function(status, text) {
|
||||||
|
|
||||||
|
if (status == 'danger') status = 'error';
|
||||||
|
|
||||||
|
return notie.alert({ type: status, text: text })
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<?=\App\Controllers\AdminController::loadMenu();?>
|
||||||
|
<?=\App\Controllers\AdminController::loadContent();?>
|
||||||
|
<h1><b>Сущности</b></h1>
|
||||||
|
<a href="?type=EntityCreate" class="btn btn-primary">Создать</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
51
views/pages/Admin/EntityCreate.php
Normal file
51
views/pages/Admin/EntityCreate.php
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
?>
|
||||||
|
<h1><b>Создание сущности</b></h1>
|
||||||
|
<form action="/admin?type=UserEdit&user_id=<?= $_GET['user_id'] ?>" method="post" name="form" id="form" enctype="multipart/form-data" style="display:inline-block; min-width:500px;">
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="exampleFormControlInput1" class="form-label">Название</label>
|
||||||
|
<input type="text" class="form-control" id="exampleFormControlInput1" placeholder="Вагон метро">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="exampleFormControlInput1" class="form-label">Цвет</label>
|
||||||
|
<input type="text" class="form-control" id="exampleFormControlInput1" placeholder="#FFFFFF">
|
||||||
|
</div>
|
||||||
|
<p>Вводимые переменные</p>
|
||||||
|
<div class="alert alert-dark" role="alert">
|
||||||
|
Добавляйте и регулируйте поля ввода, которые будут являться шаблонной формой для создания моделей к сущности.
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="exampleFormControlInput1" class="form-label">Название переменной</label>
|
||||||
|
<input type="text" class="form-control" id="exampleFormControlInput1" placeholder="#FFFFFF">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="exampleFormControlInput1" class="form-label">ID</label>
|
||||||
|
<input type="text" class="form-control" id="exampleFormControlInput1" placeholder="#FFFFFF">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label for="exampleFormControlInput1" class="form-label">Тип</label>
|
||||||
|
<select class="form-select" aria-label="Default select example">
|
||||||
|
<option value="1">Строка</option>
|
||||||
|
<option value="2">Число</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label for="exampleFormControlInput1" class="form-label">Обязателен?</label>
|
||||||
|
<select class="form-select" aria-label="Default select example">
|
||||||
|
<option value="1">Да</option>
|
||||||
|
<option value="2">Нет</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="btn btn-outline-primary">Добавить ещё</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</form>
|
Loading…
Reference in a new issue