diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php index 4917950..e06d471 100644 --- a/app/Controllers/BaseController.php +++ b/app/Controllers/BaseController.php @@ -61,6 +61,9 @@ abstract class BaseController extends Controller $this->_session = \Config\Services::session(); $this->_viewDatas['layout'] = LAYOUTS['empty']; $this->_viewDatas['session'] = $this->_session; + $this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title'); + $this->_viewDatas['class_icon'] = CLASS_ICONS[strtoupper($this->_model->getClassName())]; + helper($this->_model->getClassName()); } abstract public function getFields(string $action): array; diff --git a/app/Controllers/Front/ProductController.php b/app/Controllers/Front/ProductController.php index 7e023ee..b906499 100644 --- a/app/Controllers/Front/ProductController.php +++ b/app/Controllers/Front/ProductController.php @@ -13,9 +13,7 @@ class ProductController extends FrontController { $this->_model = new ProductModel(); parent::initController($request, $response, $logger); - $this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title'); $this->_viewPath .= strtolower($this->_model->getClassName()); - helper($this->_model->getClassName()); } public function getFields(string $action = ""): array diff --git a/app/Helpers/BoardConfig_helper.php b/app/Helpers/BoardConfig_helper.php index 0918709..11b677d 100644 --- a/app/Helpers/BoardConfig_helper.php +++ b/app/Helpers/BoardConfig_helper.php @@ -117,7 +117,7 @@ function getFieldIndex_Row_BoardConfigHelper($field, $entity, array $fieldFilter { switch ($field) { default: - return getFieldView_BoardConfigHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldView_BoardConfigHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // @@ -130,7 +130,7 @@ function getFieldIndex_Row_BoardConfigHelper_Admin($field, $entity, array $field $attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $entity->getPrimaryKey(), $field, $field); return getFieldForm_BoardConfigHelper($field, $entity->$field, $fieldFormOptions, $attributes); } - return getFieldIndex_Row_BoardConfigHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldIndex_Row_BoardConfigHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // \ No newline at end of file diff --git a/app/Helpers/Board_helper.php b/app/Helpers/Board_helper.php index 4d84bc0..aa8e1ae 100644 --- a/app/Helpers/Board_helper.php +++ b/app/Helpers/Board_helper.php @@ -120,7 +120,7 @@ function getFieldIndex_Row_BoardHelper($field, $entity, array $fieldFilters, $fi { switch ($field) { default: - return getFieldView_BoardHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldView_BoardHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // @@ -133,7 +133,7 @@ function getFieldIndex_Row_BoardHelper_Admin($field, $entity, array $fieldFilter $attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $entity->getPrimaryKey(), $field, $field); return getFieldForm_BoardHelper($field, $entity->$field, $fieldFormOptions, $attributes); } - return getFieldIndex_Row_BoardHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldIndex_Row_BoardHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // \ No newline at end of file diff --git a/app/Helpers/Category_helper.php b/app/Helpers/Category_helper.php index 246ffbe..646fb7a 100644 --- a/app/Helpers/Category_helper.php +++ b/app/Helpers/Category_helper.php @@ -112,7 +112,7 @@ function getFieldIndex_Row_CategoryHelper($field, $entity, array $fieldFilters, { switch ($field) { default: - return getFieldView_CategoryHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldView_CategoryHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // @@ -125,7 +125,7 @@ function getFieldIndex_Row_CategoryHelper_Admin($field, $entity, array $fieldFil $attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $entity->getPrimaryKey(), $field, $field); return getFieldForm_CategoryHelper($field, $entity->$field, $fieldFormOptions, $attributes); } - return getFieldIndex_Row_CategoryHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldIndex_Row_CategoryHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // \ No newline at end of file diff --git a/app/Helpers/Common_helper.php b/app/Helpers/Common_helper.php index a039146..a759c0f 100644 --- a/app/Helpers/Common_helper.php +++ b/app/Helpers/Common_helper.php @@ -154,7 +154,7 @@ function imageSubmit_CommonHelper(string $src, array $attributes = []) } // STATUS가 use가 아닐때 option을 disabled되게 하기위함 (override form_dropdown) -function form_dropdown($data = '', $options = [], $selected = [], $extra = ''): string +function form_dropdown_test($data = '', $options = [], $selected = [], $extra = ''): string { $defaults = []; if (is_array($data)) { diff --git a/app/Helpers/Order_helper.php b/app/Helpers/Order_helper.php index e1e1eb5..0a55535 100644 --- a/app/Helpers/Order_helper.php +++ b/app/Helpers/Order_helper.php @@ -97,7 +97,7 @@ function getFieldIndex_Row_OrderHelper_Admin($field, $entity, array $fieldFilter $attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $entity->getPrimaryKey(), $field, $field); return getFieldForm_OrderHelper($field, $entity->$field, $fieldFormOptions, $attributes); } - return getFieldIndex_Row_OrderHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldIndex_Row_OrderHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // \ No newline at end of file diff --git a/app/Helpers/Product_helper.php b/app/Helpers/Product_helper.php index 112932a..545a62f 100644 --- a/app/Helpers/Product_helper.php +++ b/app/Helpers/Product_helper.php @@ -124,7 +124,7 @@ function getFieldIndex_Row_ProductHelper($field, $entity, array $fieldFilters, $ { switch ($field) { default: - return getFieldView_ProductHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldView_ProductHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // @@ -137,7 +137,7 @@ function getFieldIndex_Row_ProductHelper_Admin($field, $entity, array $fieldFilt $attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $entity->getPrimaryKey(), $field, $field); return getFieldForm_ProductHelper($field, $entity->$field, $fieldFormOptions, $attributes); } - return getFieldIndex_Row_ProductHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldIndex_Row_ProductHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // \ No newline at end of file diff --git a/app/Helpers/UserSNS_helper.php b/app/Helpers/UserSNS_helper.php index a1bd96a..5f35544 100644 --- a/app/Helpers/UserSNS_helper.php +++ b/app/Helpers/UserSNS_helper.php @@ -93,7 +93,7 @@ function getFieldIndex_Row_UserSNSHelper($field, $entity, array $fieldFilters, $ { switch ($field) { default: - return getFieldView_UserSNSHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldView_UserSNSHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // @@ -106,7 +106,7 @@ function getFieldIndex_Row_UserSNSHelper_Admin($field, $entity, array $fieldFilt $attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $entity->getPrimaryKey(), $field, $field); return getFieldForm_UserSNSHelper($field, $entity->$field, $fieldFormOptions, $attributes); } - return getFieldIndex_Row_UserSNSHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldIndex_Row_UserSNSHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // \ No newline at end of file diff --git a/app/Helpers/User_helper.php b/app/Helpers/User_helper.php index ab7c41f..2bfa7fd 100644 --- a/app/Helpers/User_helper.php +++ b/app/Helpers/User_helper.php @@ -108,7 +108,7 @@ function getFieldIndex_Row_UserHelper($field, $entity, array $fieldFilters, $fie { switch ($field) { default: - return getFieldView_UserHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldView_UserHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // @@ -121,7 +121,7 @@ function getFieldIndex_Row_UserHelper_Admin($field, $entity, array $fieldFilters $attributes["onChange"] = sprintf('location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $entity->getPrimaryKey(), $field, $field); return getFieldForm_UserHelper($field, $entity->$field, $fieldFormOptions, $attributes); } - return getFieldIndex_Row_UserHelper($field, $entity, $fieldFormOptions, $attributes); + return getFieldIndex_Row_UserHelper($field, $entity, $fieldFilters, $fieldFormOptions, $attributes); break; } } // \ No newline at end of file diff --git a/app/Models/BoardConfigModel.php b/app/Models/BoardConfigModel.php index 77875a5..c5f146a 100644 --- a/app/Models/BoardConfigModel.php +++ b/app/Models/BoardConfigModel.php @@ -52,7 +52,7 @@ class BoardConfigModel extends BaseModel return $rules; } //Form 선택용 Options Data용 - public function getOptions(array $conditions = array(), $options = array()): array + public function getOptions_TEST(array $conditions = array(), $options = array()): array { foreach ($this->getEntitys($conditions) as $entity) { // STATUS가 use가 아닐때 option을 disabled되게 하기위함 diff --git a/app/Models/CategoryModel.php b/app/Models/CategoryModel.php index 88367e3..f41d6fa 100644 --- a/app/Models/CategoryModel.php +++ b/app/Models/CategoryModel.php @@ -40,7 +40,6 @@ class CategoryModel extends BaseHierarchyModel return $rules; } - //Form 선택용 Options Data용 public function getOptions(array $conditions = array(), $options = array()): array { //대분류 부분은 선택이 되지 않게 하기위해 따로 만듬 (form_dropdown의 optgroup 기능) @@ -50,12 +49,7 @@ class CategoryModel extends BaseHierarchyModel $options[$entity->getTitle()] = []; $old_title = $entity->getTitle(); } else { - // STATUS가 use가 아닐때 option을 disabled되게 하기위함 - if ($entity->getStatus() != DEFAULTS['STATUS']) { - $options[$old_title][$entity->getPrimaryKey() . "\" disabled=\"disabled"] = $entity->getTitle(); - } else { - $options[$old_title][$entity->getPrimaryKey()] = $entity->getTitle(); - } + $options[$old_title][$entity->getPrimaryKey()] = $entity->getTitle(); } } return $options; diff --git a/app/Models/ProductModel.php b/app/Models/ProductModel.php index 4123b00..b8a75cb 100644 --- a/app/Models/ProductModel.php +++ b/app/Models/ProductModel.php @@ -61,7 +61,7 @@ class ProductModel extends BaseModel return $rules; } //Form 선택용 Options Data용 - public function getOptions(array $conditions = array(), $options = array()): array + public function getOptions_TEST(array $conditions = array(), $options = array()): array { foreach ($this->getEntitys($conditions) as $entity) { // STATUS가 use가 아닐때 option을 disabled되게 하기위함 diff --git a/app/Models/UserModel.php b/app/Models/UserModel.php index 636ca70..0793a37 100644 --- a/app/Models/UserModel.php +++ b/app/Models/UserModel.php @@ -55,7 +55,7 @@ class UserModel extends BaseModel return $rules; } //Form 선택용 Options Data용 - public function getOptions(array $conditions = array(), $options = array()): array + public function getOptions_TEST(array $conditions = array(), $options = array()): array { foreach ($this->getEntitys($conditions) as $entity) { // STATUS가 use가 아닐때 option을 disabled되게 하기위함 diff --git a/app/Views/front/board/index.php b/app/Views/front/board/index.php index 5637821..298a9df 100644 --- a/app/Views/front/board/index.php +++ b/app/Views/front/board/index.php @@ -25,7 +25,7 @@ - + diff --git a/app/Views/front/order/index.php b/app/Views/front/order/index.php index a4e8582..4bcd759 100644 --- a/app/Views/front/order/index.php +++ b/app/Views/front/order/index.php @@ -22,7 +22,7 @@ - + getStatus() == DEFAULTS['STATUS'] ? anchor('ecommerce/cancelCart/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) : "" ?> diff --git a/app/Views/front/product/index.php b/app/Views/front/product/index.php index 52c298b..140705d 100644 --- a/app/Views/front/product/index.php +++ b/app/Views/front/product/index.php @@ -21,7 +21,7 @@ - + diff --git a/app/Views/templates/admin/header.php b/app/Views/templates/admin/header.php index f8a2e17..a74b247 100644 --- a/app/Views/templates/admin/header.php +++ b/app/Views/templates/admin/header.php @@ -1,3 +1,3 @@
-

+

\ No newline at end of file diff --git a/app/Views/templates/front/header.php b/app/Views/templates/front/header.php index f8a2e17..a74b247 100644 --- a/app/Views/templates/front/header.php +++ b/app/Views/templates/front/header.php @@ -1,3 +1,3 @@
-

+

\ No newline at end of file