From 732c5dc8546bab90085b54c45be89a9bf2caad8b Mon Sep 17 00:00:00 2001
From: themohooks <81331307+themohooks@users.noreply.github.com>
Date: Sun, 15 Sep 2024 21:31:44 +0300
Subject: [PATCH] entities admin
---
views/components/AdminSidebar.php | 4 ++
views/pages/Admin/Entities.php | 96 ++++++++++++++++++++++++------
views/pages/Admin/EntityCreate.php | 47 ++++++++-------
views/pages/Admin/Models.php | 0
views/pages/Admin/ModelsCreate.php | 0
5 files changed, 107 insertions(+), 40 deletions(-)
create mode 100644 views/pages/Admin/Models.php
create mode 100644 views/pages/Admin/ModelsCreate.php
diff --git a/views/components/AdminSidebar.php b/views/components/AdminSidebar.php
index 8084539..6b50a7b 100644
--- a/views/components/AdminSidebar.php
+++ b/views/components/AdminSidebar.php
@@ -66,6 +66,10 @@ body {
Сущности
+
+
+ База моделей
+
diff --git a/views/pages/Admin/Entities.php b/views/pages/Admin/Entities.php
index e342b8b..9844f2a 100644
--- a/views/pages/Admin/Entities.php
+++ b/views/pages/Admin/Entities.php
@@ -1,5 +1,8 @@
-
-
+
+
+
-
-=\App\Controllers\AdminController::loadMenu();?>
-=\App\Controllers\AdminController::loadContent();?>
-
Сущности
-
Создать
-
+
+ = \App\Controllers\AdminController::loadMenu(); ?>
+ = \App\Controllers\AdminController::loadContent(); ?>
+
Сущности
+
Создать
+
+
+
+
+ ID
+ Название
+ Действия
+
+
+
+
+ '.$p['id'].'
+
+
+ '.$p['title'].'
+
+
+
+ ';
+
+ echo 'Редактировать
+ Удалить
+
+ ';
+
+ echo '
+
+
+
+
+ ';
+ }
+ ?>
+
+
+
+
+
+
+
+
+
diff --git a/views/pages/Admin/EntityCreate.php b/views/pages/Admin/EntityCreate.php
index 343358a..fc80aa7 100644
--- a/views/pages/Admin/EntityCreate.php
+++ b/views/pages/Admin/EntityCreate.php
@@ -1,4 +1,8 @@
$_POST['title'], ':createdate' => time(), ':sampledata' => $jsonResult, ':color' => $_POST['color']));
+ header('Location: /admin?type=Entities');
}
?>
Создание сущности
@@ -32,11 +36,11 @@ if (isset($_POST['create'])) {
Название
-
+
Цвет
-
+
Вводимые переменные
@@ -56,14 +60,14 @@ if (isset($_POST['create'])) {
- Тип
+ Тип
Строка
Число
- Обязателен?
+ Обязателен?
Да
Нет
@@ -73,19 +77,19 @@ if (isset($_POST['create'])) {
Добавить ещё
Создать сущность
-
-
+
+
\ No newline at end of file
diff --git a/views/pages/Admin/Models.php b/views/pages/Admin/Models.php
new file mode 100644
index 0000000..e69de29
diff --git a/views/pages/Admin/ModelsCreate.php b/views/pages/Admin/ModelsCreate.php
new file mode 100644
index 0000000..e69de29