From adda32d03e1f4c951b248acdde2154e8a52a4858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Thu, 10 Aug 2023 14:26:08 +0900 Subject: [PATCH] shoppingmallv2 init... --- app/Controllers/Admin/CategoryController.php | 2 +- app/Controllers/Admin/ProductController.php | 2 +- app/Helpers/Category_helper.php | 25 +++-- app/Helpers/Order_helper.php | 4 +- app/Helpers/Product_helper.php | 12 ++- app/Views/admin/board/index.php | 15 ++- app/Views/admin/board/insert.php | 29 +++--- app/Views/admin/board/reply.php | 29 +++--- app/Views/admin/board/update.php | 29 +++--- app/Views/admin/board/view.php | 25 +++-- app/Views/admin/category/index.php | 15 ++- app/Views/admin/category/insert.php | 29 +++--- app/Views/admin/category/reply.php | 29 +++--- app/Views/admin/category/update.php | 29 +++--- app/Views/admin/category/view.php | 25 +++-- app/Views/admin/order/index.php | 19 ++-- app/Views/admin/order/update.php | 29 +++--- app/Views/admin/order/view.php | 25 +++-- app/Views/admin/product/index.php | 17 ++-- app/Views/admin/product/insert.php | 29 +++--- app/Views/admin/product/update.php | 29 +++--- app/Views/admin/product/view.php | 25 +++-- app/Views/admin/sitepage/index.php | 15 ++- app/Views/admin/sitepage/insert.php | 29 +++--- app/Views/admin/sitepage/update.php | 29 +++--- app/Views/admin/sitepage/view.php | 25 +++-- app/Views/admin/user/index.php | 19 ++-- app/Views/admin/user/insert.php | 29 +++--- app/Views/admin/user/update.php | 29 +++--- app/Views/admin/user/view.php | 25 +++-- app/Views/admin/usersns/index.php | 19 ++-- app/Views/admin/usersns/view.php | 25 +++-- app/Views/layouts/admin.php | 43 ++++---- app/Views/templates/admin/header.php | 12 ++- app/Views/templates/admin/index_head.php | 25 +++-- public/css/admin.css | 100 +++++-------------- public/css/admin/content.css | 98 ++++++++++++++++++ public/css/front/content.css | 5 +- 38 files changed, 569 insertions(+), 430 deletions(-) create mode 100644 public/css/admin/content.css diff --git a/app/Controllers/Admin/CategoryController.php b/app/Controllers/Admin/CategoryController.php index a599519..0fd36c5 100644 --- a/app/Controllers/Admin/CategoryController.php +++ b/app/Controllers/Admin/CategoryController.php @@ -29,7 +29,7 @@ class CategoryController extends AdminController case "index": case "excel": return [ - 'name', "linkurl", 'photo', "isaccess", "isread", "iswrite", "isreply", "isupload", "isdownload", + 'name', "linkurl", "isaccess", "isread", "iswrite", "isreply", "isupload", "isdownload", "status", "created_at" ]; break; diff --git a/app/Controllers/Admin/ProductController.php b/app/Controllers/Admin/ProductController.php index afe2d16..e9020a0 100644 --- a/app/Controllers/Admin/ProductController.php +++ b/app/Controllers/Admin/ProductController.php @@ -24,7 +24,7 @@ class ProductController extends AdminController switch ($action) { case "index": case "excel": - return ["category_uid", "user_uid", 'name', "photo", "cost", "sale", "price", "stock", "view_cnt", "status", "created_at"]; + return ["category_uid", "user_uid", 'name', "cost", "sale", "price", "stock", "view_cnt", "status", "created_at"]; break; case "view": return [...$fields, "created_at"]; diff --git a/app/Helpers/Category_helper.php b/app/Helpers/Category_helper.php index fc6d83a..c87c95f 100644 --- a/app/Helpers/Category_helper.php +++ b/app/Helpers/Category_helper.php @@ -112,9 +112,25 @@ function getFieldIndex_Column_CategoryHelper($field, array $viewDatas) //Front용 function getFieldIndex_Row_CategoryHelper($field, $entity, array $viewDatas): string +{ + switch ($field) { + default: + return getFieldView_CategoryHelper($field, $entity, $viewDatas); + break; + } +} // +//Admin용 +function getFieldIndex_Row_CategoryHelper_Admin($field, $entity, array $viewDatas): string { $value = $entity->$field ?: DEFAULTS['EMPTY']; switch ($field) { + case 'linkurl': + return sprintf( + "
%s
%s
", + $entity->getFileImage('middle', 'photo'), + $value + ); + break; case 'title': case 'name': $reply = anchor( @@ -134,15 +150,6 @@ function getFieldIndex_Row_CategoryHelper($field, $entity, array $viewDatas): st $view ); break; - default: - return getFieldView_CategoryHelper($field, $entity, $viewDatas); - break; - } -} // -//Admin용 -function getFieldIndex_Row_CategoryHelper_Admin($field, $entity, array $viewDatas): string -{ - switch ($field) { default: if (in_array($field, $viewDatas['fieldFilters'])) { $attributes["onChange"] = sprintf( diff --git a/app/Helpers/Order_helper.php b/app/Helpers/Order_helper.php index 9ea54b3..792156d 100644 --- a/app/Helpers/Order_helper.php +++ b/app/Helpers/Order_helper.php @@ -110,7 +110,7 @@ function getFieldIndex_Row_OrderHelper($field, $entity, array $viewDatas): strin case 'title': case 'name': return sprintf( - "
%s : %s
%s", + "
%s : %s
%s
", lang("{$viewDatas['className']}.label.uid"), $entity->getOrderHint(), anchor( @@ -133,7 +133,7 @@ function getFieldIndex_Row_OrderHelper_Admin($field, $entity, array $viewDatas): case 'title': case 'name': return sprintf( - "
%s : %s
%s", + "
%s : %s
%s
", lang("{$viewDatas['className']}.label.uid"), $entity->getPrimaryKey(), anchor( diff --git a/app/Helpers/Product_helper.php b/app/Helpers/Product_helper.php index 8a065ab..0e1d6ed 100644 --- a/app/Helpers/Product_helper.php +++ b/app/Helpers/Product_helper.php @@ -145,10 +145,14 @@ function getFieldIndex_Row_ProductHelper_Admin($field, $entity, array $viewDatas switch ($field) { case 'title': case 'name': - return anchor( - current_url() . '/view/' . $entity->getPrimaryKey(), - $value ? str_split($value, 66)[0] . "..." : "", - ["target" => "_self"] + return sprintf( + "
%s
%s
", + $entity->getFileImage('middle', 'photo'), + anchor( + current_url() . '/view/' . $entity->getPrimaryKey(), + $value, + ["target" => "_self"] + ) ); break; default: diff --git a/app/Views/admin/board/index.php b/app/Views/admin/board/index.php index 1407962..2aabaec 100644 --- a/app/Views/admin/board/index.php +++ b/app/Views/admin/board/index.php @@ -1,16 +1,15 @@ extend('layouts/admin') ?> section('content') ?> -
-
- "get")) ?> - - + + include('templates/admin/index_head') ?>
- +
diff --git a/app/Views/admin/board/insert.php b/app/Views/admin/board/insert.php index aa4f729..462fb1c 100644 --- a/app/Views/admin/board/insert.php +++ b/app/Views/admin/board/insert.php @@ -1,21 +1,24 @@ extend('layouts/admin') ?> section('content') ?> -
+ +
-
번호
- +
+ + + + + + + - - + - - - - + +
+ + +
- - - "btn btn-outline btn-primary")); ?>
"btn btn-outline btn-primary")); ?>
-
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/board/reply.php b/app/Views/admin/board/reply.php index a1fd37c..9a9c10b 100644 --- a/app/Views/admin/board/reply.php +++ b/app/Views/admin/board/reply.php @@ -1,21 +1,24 @@ extend('layouts/admin') ?> section('content') ?> -
+ +
- - +
+ + + + + + + - - + - - - - + +
+ $field ?: DEFAULTS['EMPTY'], $viewDatas) ?> + +
- $field ?: DEFAULTS['EMPTY']), $viewDatas) ?> - - "btn btn-outline btn-primary")); ?>
"btn btn-outline btn-primary")); ?>
-
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/board/update.php b/app/Views/admin/board/update.php index a1fd37c..0072043 100644 --- a/app/Views/admin/board/update.php +++ b/app/Views/admin/board/update.php @@ -1,21 +1,24 @@ extend('layouts/admin') ?> section('content') ?> -
+ +
- - +
+ + + + + + + - - + - - - - + +
+ $field ?: DEFAULTS['EMPTY'], $viewDatas) ?> + +
- $field ?: DEFAULTS['EMPTY']), $viewDatas) ?> - - "btn btn-outline btn-primary")); ?>
"btn btn-outline btn-primary")); ?>
-
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/board/view.php b/app/Views/admin/board/view.php index ae949de..5e78f32 100644 --- a/app/Views/admin/board/view.php +++ b/app/Views/admin/board/view.php @@ -1,16 +1,19 @@ extend('layouts/admin') ?> section('content') ?> -
- - - - - - - + +
+
- - -
+ + + + + + + +
+ + +
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/category/index.php b/app/Views/admin/category/index.php index 1275d04..85e1f10 100644 --- a/app/Views/admin/category/index.php +++ b/app/Views/admin/category/index.php @@ -1,16 +1,15 @@ extend('layouts/admin') ?> section('content') ?> -
-
- "get")) ?> - - + + include('templates/admin/index_head') ?>
- +
diff --git a/app/Views/admin/category/insert.php b/app/Views/admin/category/insert.php index 7ecc181..c617e5b 100644 --- a/app/Views/admin/category/insert.php +++ b/app/Views/admin/category/insert.php @@ -1,21 +1,24 @@ extend('layouts/admin') ?> section('content') ?> -
+ +
-
번호
- +
+ + + + + + + - - + - - - - + +
+ + +
- - - "btn btn-outline btn-primary")); ?>
"btn btn-outline btn-primary")); ?>
-
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/category/reply.php b/app/Views/admin/category/reply.php index fa34d5a..c807fb2 100644 --- a/app/Views/admin/category/reply.php +++ b/app/Views/admin/category/reply.php @@ -1,21 +1,24 @@ extend('layouts/admin') ?> section('content') ?> -
+ +
- - +
+ + + + + + + - - + - - - - + +
+ $field ?: DEFAULTS['EMPTY'], $viewDatas) ?> + +
- $field ?: DEFAULTS['EMPTY']), $viewDatas) ?> - - "btn btn-outline btn-primary")); ?>
"btn btn-outline btn-primary")); ?>
-
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/category/update.php b/app/Views/admin/category/update.php index fa34d5a..588fb8c 100644 --- a/app/Views/admin/category/update.php +++ b/app/Views/admin/category/update.php @@ -1,21 +1,24 @@ extend('layouts/admin') ?> section('content') ?> -
+ +
- - +
+ + + + + + + - - + - - - - + +
+ $field ?: DEFAULTS['EMPTY'], $viewDatas) ?> + +
- $field ?: DEFAULTS['EMPTY']), $viewDatas) ?> - - "btn btn-outline btn-primary")); ?>
"btn btn-outline btn-primary")); ?>
-
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/category/view.php b/app/Views/admin/category/view.php index 81193b4..e6ff9d3 100644 --- a/app/Views/admin/category/view.php +++ b/app/Views/admin/category/view.php @@ -1,16 +1,19 @@ extend('layouts/admin') ?> section('content') ?> -
- - - - - - - + +
+
- - -
+ + + + + + + +
+ + +
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/order/index.php b/app/Views/admin/order/index.php index 092f141..8c68aed 100644 --- a/app/Views/admin/order/index.php +++ b/app/Views/admin/order/index.php @@ -1,16 +1,15 @@ extend('layouts/admin') ?> section('content') ?> -
-
- "get")) ?> - - + + include('templates/admin/index_head') ?>
- +
@@ -31,9 +30,9 @@ + + - -
번호 getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?>