diff --git a/app/Config/Constants.php b/app/Config/Constants.php index 3eddb1d..350bced 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -280,7 +280,9 @@ define('KEYWORD', '일본IDC 일본서버 일본 서버 일본호스팅 서버 define('LAYOUTS', [ 'empty' => [ 'title' => KEYWORD, - 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'empty', + 'path' => 'empty', + 'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'empty', + 'template' => 'templates' . DIRECTORY_SEPARATOR . 'empty', 'metas' => [ '', '', @@ -303,7 +305,9 @@ define('LAYOUTS', [ ], 'front' => [ 'title' => KEYWORD, - 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'front', + 'path' => 'front', + 'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'front', + 'template' => 'templates' . DIRECTORY_SEPARATOR . 'front', 'topmenus' => ['aboutus', 'hosting', 'service', 'support'], 'metas' => [ '', @@ -332,7 +336,9 @@ define('LAYOUTS', [ ], 'admin' => [ 'title' => '관리자화면', - 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'admin', + 'path' => 'admin', + 'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'admin', + 'template' => 'templates' . DIRECTORY_SEPARATOR . 'admin', 'metas' => [ '', '', @@ -351,7 +357,7 @@ define('LAYOUTS', [ '', '', '', - '', + '', '', ], 'javascripts' => [ @@ -359,8 +365,8 @@ define('LAYOUTS', [ '', '', '', - '', - '' + '', + '' ], ], ]); diff --git a/app/Controllers/AbstractWebController.php b/app/Controllers/AbstractWebController.php index 5eaa6a8..62f2779 100644 --- a/app/Controllers/AbstractWebController.php +++ b/app/Controllers/AbstractWebController.php @@ -113,16 +113,19 @@ abstract class AbstractWebController extends Controller protected function action_render_process(string $view_file, array $viewDatas, ?string $template_path = null): string { // dd($viewDatas); - $view_path = $viewDatas['layout']; + $view_path = $viewDatas['layout']['path']; if ($template_path) { - $view_path .= DIRECTORY_SEPARATOR . $template_path; + $view_path .= '/' . $template_path; } - $view_datas = [ - ...$viewDatas, - 'forms' => ['attributes' => ['method' => "post",], 'hiddens' => []], - ]; - + $full_path = $view_path . '/' . $view_file; + // echo $full_path; + // exit; helper(['form', __FUNCTION__]); - return view($view_path . DIRECTORY_SEPARATOR . $view_file, ['viewDatas' => $view_datas]); + return view($full_path, [ + 'viewDatas' => [ + ...$viewDatas, + 'forms' => ['attributes' => ['method' => "post",], 'hiddens' => []], + ] + ]); } } diff --git a/app/Controllers/Admin/AdminController.php b/app/Controllers/Admin/AdminController.php index 1ee4e76..f1bd757 100644 --- a/app/Controllers/Admin/AdminController.php +++ b/app/Controllers/Admin/AdminController.php @@ -9,20 +9,19 @@ use Psr\Log\LoggerInterface; abstract class AdminController extends CommonController { + private $_layout = 'admin'; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->addActionPaths('admin'); - } - final protected function getLayout(): string - { - return 'admin'; + $this->addActionPaths($this->_layout); } protected function action_init_process(string $action, ?object $entity = null): void { $this->service->action_init_process($action, $entity); parent::action_init_process($action, $entity); - $this->addViewDatas('layout', $this->getLayout()); + $layouts = LAYOUTS[$this->_layout]; + array_push($layouts['javascripts'], ''); + $this->addViewDatas('layout', $layouts); $this->addViewDatas('title', $this->getTitle()); $this->addViewDatas('helper', $this->service->getHelper()); $this->addViewDatas('formFields', $this->service->getFormService()->getFormFields()); diff --git a/app/Controllers/Admin/SearchController.php b/app/Controllers/Admin/SearchController.php new file mode 100644 index 0000000..0f9a35f --- /dev/null +++ b/app/Controllers/Admin/SearchController.php @@ -0,0 +1,48 @@ +service === null) { + $this->service = service('customer_serviceservice'); + } + $this->addActionPaths('service'); + } + //Action작업관련 + protected function getEntityClass(): string + { + return ServiceEntity::class; + } + //기본 함수 작업 + //Custom 추가 함수 + protected function index_entities_process(array $entities = []): array + { + $keyword = $this->request->getGet('keyword'); // 검색어 + if (!$keyword) { + throw new \Exception("[{$keyword}] 검색어가 지정되지 않았습니다. "); + } + //검색어에 따른 서버정보를 검색 후 해당하는 서비스리스트를 가져온다. + $rows = service('equipment_serverservice')->getSearchServices($keyword); + $uids = []; + foreach ($rows as $row) { + $uids[] = "'{$row->serviceinfo_uid}'"; + } + //서비스별 서버리스트 + // $childServers = []; + foreach ($this->service->getEntities([sprintf("uid IN (%s)", implode(",", $uids)) => null]) as $entity) { + $entities[] = $entity; + // $childServers[$entity->getPK()] = $this->getService()->getServerService()->getEntities(['serviceinfo_uid' => $entity->getPK()]); + } + // $this->childServers = $childServers; + return $entities; + } +} diff --git a/app/Entities/Equipment/ServerEntity.php b/app/Entities/Equipment/ServerEntity.php index ca4724d..d6841cc 100644 --- a/app/Entities/Equipment/ServerEntity.php +++ b/app/Entities/Equipment/ServerEntity.php @@ -19,7 +19,7 @@ class ServerEntity extends EquipmentEntity //기본기능용 public function getCustomTitle(mixed $title = null): string { - return sprintf("[%s]%s", $this->getCode(), $title ? $title : $this->getIP()); + return sprintf("[%s]%s / %s / %s", $this->getCode(), $title ? $title : $this->getIP(), $this->getSwitch(), $this->getOS()); } final public function getCode(): string { diff --git a/app/Forms/BoardForm.php b/app/Forms/BoardForm.php index f5a10f8..bed8275 100644 --- a/app/Forms/BoardForm.php +++ b/app/Forms/BoardForm.php @@ -49,7 +49,7 @@ class BoardForm extends CommonForm $tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"]; switch ($field) { case 'worker_uid': - foreach (service('userservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity) { + foreach ($this->getFormOption_process(service('userservice'), $action, $field, $entity) as $entity) { $tempOptions[$entity->getPK()] = $entity->getTitle(); // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; } diff --git a/app/Forms/CommonForm.php b/app/Forms/CommonForm.php index 93ae4f4..4d6eb50 100644 --- a/app/Forms/CommonForm.php +++ b/app/Forms/CommonForm.php @@ -191,8 +191,7 @@ abstract class CommonForm $entities = $service->getEntities(['status' => STATUS['AVAILABLE']]); break; case 'modify_form': - $where = sprintf("status = '%s' OR uid=%s", STATUS['AVAILABLE'], $entity->$field); - echo $where; + $where = sprintf("status = '%s' OR %s=%s", STATUS['AVAILABLE'], $this->getAttribute('pk_field'), $entity->$field); $entities = $service->getEntities([$where => null]); break; default: diff --git a/app/Forms/Customer/ServiceForm.php b/app/Forms/Customer/ServiceForm.php index 623c26a..6b39045 100644 --- a/app/Forms/Customer/ServiceForm.php +++ b/app/Forms/Customer/ServiceForm.php @@ -52,7 +52,7 @@ class ServiceForm extends CustomerForm switch ($field) { case 'serverinfo_uid': foreach ($this->getFormOption_process(service('equipment_serverservice'), $action, $field, $entity) as $entity) { - $tempOptions[$entity->getPK()] = $entity->getTitle(); + $tempOptions[$entity->getPK()] = $entity->getCustomTitle(); // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; } $options['options'] = $tempOptions; diff --git a/app/Forms/Equipment/ServerForm.php b/app/Forms/Equipment/ServerForm.php index 89e3975..1cebcdd 100644 --- a/app/Forms/Equipment/ServerForm.php +++ b/app/Forms/Equipment/ServerForm.php @@ -50,9 +50,7 @@ class ServerForm extends EquipmentForm $tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"]; switch ($field) { case 'serviceinfo_uid': - foreach ( - service('customer_serviceservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity - ) { + foreach ($this->getFormOption_process(service('customer_serviceservice'), $action, $field, $entity) as $entity) { $tempOptions[$entity->getPK()] = $entity->getTitle(); // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; } diff --git a/app/Forms/Equipment/ServerPartForm.php b/app/Forms/Equipment/ServerPartForm.php index 8b2b4d6..b630e76 100644 --- a/app/Forms/Equipment/ServerPartForm.php +++ b/app/Forms/Equipment/ServerPartForm.php @@ -58,18 +58,14 @@ class ServerPartForm extends EquipmentForm $options['options'] = $tempOptions; break; case 'serverinfo_uid': - foreach ( - service('equipment_serverservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity - ) { + foreach ($this->getFormOption_process(service('equipment_serverservice'), $action, $field, $entity) as $entity) { $tempOptions[$entity->getPK()] = $entity->getTitle(); // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; } $options['options'] = $tempOptions; break; case 'serviceinfo_uid': - foreach ( - service('customer_serviceservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity - ) { + foreach ($this->getFormOption_process(service('customer_clientservice'), $action, $field, $entity) as $entity) { $tempOptions[$entity->getPK()] = $entity->getTitle(); // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; } diff --git a/app/Forms/Part/IPForm.php b/app/Forms/Part/IPForm.php index 9a75b3b..db186bf 100644 --- a/app/Forms/Part/IPForm.php +++ b/app/Forms/Part/IPForm.php @@ -32,14 +32,14 @@ class IPForm extends PartForm $tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"]; switch ($field) { case 'lineinfo_uid': - foreach (service('equipment_lineservice')->getEntities() as $entity) { + foreach ($this->getFormOption_process(service('equipment_lineservice'), $action, $field, $entity) as $entity) { $tempOptions[$entity->getPK()] = $entity->getTitle(); // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; } $options['options'] = $tempOptions; break; case 'old_clientinfo_uid': - foreach (service('customer_clientservice')->getEntities() as $entity) { + foreach ($this->getFormOption_process(service('customer_clientservice'), $action, $field, $entity) as $entity) { $tempOptions[$entity->getPK()] = $entity->getTitle(); // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; } diff --git a/app/Forms/Part/PartForm.php b/app/Forms/Part/PartForm.php index 35410ee..0b8c76f 100644 --- a/app/Forms/Part/PartForm.php +++ b/app/Forms/Part/PartForm.php @@ -40,14 +40,14 @@ abstract class PartForm extends CommonForm $tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"]; switch ($field) { case 'serviceinfo_uid': - foreach (service('customer_serviceservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity) { + foreach ($this->getFormOption_process(service('customer_serviceservice'), $action, $field, $entity) as $entity) { $tempOptions[$entity->getPK()] = $entity->getTitle(); // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; } $options['options'] = $tempOptions; break; case 'serverinfo_uid': - foreach (service('equipment_serverservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity) { + foreach ($this->getFormOption_process(service('equipment_serverservice'), $action, $field, $entity) as $entity) { $tempOptions[$entity->getPK()] = $entity->getTitle(); // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; } diff --git a/app/Forms/PaymentForm.php b/app/Forms/PaymentForm.php index fcc9880..998ee00 100644 --- a/app/Forms/PaymentForm.php +++ b/app/Forms/PaymentForm.php @@ -46,7 +46,7 @@ class PaymentForm extends CommonForm $tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"]; switch ($field) { case 'serviceinfo_uid': - foreach (service('customer_serviceservice')->getEntities() as $entity) { + foreach ($this->getFormOption_process(service('customer_serviceservice'), $action, $field, $entity) as $entity) { $tempOptions[$entity->getPK()] = $entity->getTitle(); // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; } diff --git a/app/Helpers/CommonHelper.php b/app/Helpers/CommonHelper.php index 45f858e..b3216fe 100644 --- a/app/Helpers/CommonHelper.php +++ b/app/Helpers/CommonHelper.php @@ -184,6 +184,7 @@ abstract class CommonHelper if (in_array($field, $viewDatas['formFilters'])) { if ($value) { if (!array_key_exists($value, $viewDatas['formOptions'][$field]['options'])) { + // dd($viewDatas['formOptions'][$field]['options']); throw new \Exception(__METHOD__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다."); } $value = !$value ? "" : $viewDatas['formOptions'][$field]['options'][$value]; diff --git a/app/Helpers/Customer/ServiceHelper.php b/app/Helpers/Customer/ServiceHelper.php index 06894e0..e4585e0 100644 --- a/app/Helpers/Customer/ServiceHelper.php +++ b/app/Helpers/Customer/ServiceHelper.php @@ -32,6 +32,10 @@ class ServiceHelper extends CustomerHelper public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null { switch ($field) { + case 'serverinfo_uid': + $value = $viewDatas['formOptions'][$field]['options'][$value]; + $value = "')\" text-data=\"{$value}\">📋{$value}"; + break; case 'amount': case 'sale': $value = number_format($value) . "원"; @@ -54,7 +58,19 @@ class ServiceHelper extends CustomerHelper } return $value; } - + public function getListLabel(string $field, string $label, array $viewDatas, array $extras = []): string + { + switch ($field) { + case 'serverinfo_uid': + $label = parent::getListLabel($field, $label, $viewDatas, $extras); + $label .= "ALL 📋"; + break; + default: + $label = parent::getListLabel($field, $label, $viewDatas, $extras); + break; + } + return $label; + } public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string { switch ($action) { diff --git a/app/Views/admin/api/index.php b/app/Views/admin/api/index.php deleted file mode 100644 index 070703b..0000000 --- a/app/Views/admin/api/index.php +++ /dev/null @@ -1,148 +0,0 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> - -section('content') ?> -alertTrait(session('message')) : ""; ?> - -
include("{$layouts}/top"); ?>
- - - - - -
include("{$layouts}/left_menu"); ?> -
include("{$template}/index_header"); ?>
-
- - -
- - include("{$template}/index_content_filter"); ?> - 'batchjob_form', 'method' => "post"]) ?> - - - - - $label): ?> - - - - - - - - - - - -
번호getListLabel($field, $label, $viewDatas) ?>작업
목록 데이터를 로드 중입니다...
- - -
- include("{$template}/index_content_bottom"); ?> -
- - -
- -
- -
-
include("{$layouts}/bottom"); ?>
- - -endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/client/detail.php b/app/Views/admin/client/detail.php index 3dae723..1f2f833 100644 --- a/app/Views/admin/client/detail.php +++ b/app/Views/admin/client/detail.php @@ -1,6 +1,6 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> +extend($viewDatas['layout']['layout']) ?> section('content') ?> - + alertTrait(session('message')) : ""; ?> -
include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
+
include($viewDatas['layout']['layout'] . '/top'); ?>
- include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?> + include($viewDatas['layout']['layout'] . '/left_menu'); ?> -
include("templates/{$viewDatas['layout']}/index_header"); ?>
+
include("{$viewDatas['layout']['template']}/index_header"); ?>
@@ -127,11 +127,11 @@
- +
-
include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?>
+
include($viewDatas['layout']['layout'] . '/bottom'); ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/create_form.php b/app/Views/admin/create_form.php index decc70a..83ef1b2 100644 --- a/app/Views/admin/create_form.php +++ b/app/Views/admin/create_form.php @@ -1,8 +1,8 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> +extend($viewDatas['layout']['layout']) ?> section('content') ?> alertTrait(session('message')) : ""; ?>
-
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_top"); ?>
$label): ?> @@ -17,6 +17,6 @@
"btn btn-outline btn-primary")); ?>
-
include("templates/{$viewDatas['layout']}/form_content_bottom"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_bottom"); ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/index.php b/app/Views/admin/index.php index b1a389b..1093cde 100644 --- a/app/Views/admin/index.php +++ b/app/Views/admin/index.php @@ -1,20 +1,16 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> - +extend($viewDatas['layout']['layout']) ?> section('content') ?> alertTrait(session('message')) : ""; ?> -
include("{$layouts['path']}/top"); ?>
+
include("{$viewDatas['layout']['layout']}/top"); ?>
- +
include("{$layouts['path']}/left_menu"); ?>include("{$viewDatas['layout']['layout']}/left_menu"); ?> -
include("{$template}/index_header"); ?>
+
include("{$viewDatas['layout']['template']}/index_header"); ?>
- +
- include("{$template}/index_content_filter"); ?> + include("{$viewDatas['layout']['template']}/index_content_filter"); ?> 'batchjob_form', 'method' => "post"]) ?> @@ -46,13 +42,13 @@ $template = "templates" . DIRECTORY_SEPARATOR . "{$viewDatas['layout']}";
- include("{$template}/index_content_bottom"); ?> + include("{$viewDatas['layout']['template']}/index_content_bottom"); ?>
- +
-
include("{$layouts['path']}/bottom"); ?>
+
include("{$viewDatas['layout']['layout']}/bottom"); ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/modify_form.php b/app/Views/admin/modify_form.php index 2960392..bae98a4 100644 --- a/app/Views/admin/modify_form.php +++ b/app/Views/admin/modify_form.php @@ -1,8 +1,8 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> +extend($viewDatas['layout']['layout']) ?> section('content') ?> alertTrait(session('message')) : ""; ?>
-
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_top"); ?>
$label): ?> @@ -17,6 +17,6 @@
"btn btn-outline btn-primary")); ?>
-
include("templates/{$viewDatas['layout']}/form_content_bottom"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_bottom"); ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/popup/create_form.php b/app/Views/admin/popup/create_form.php index decc70a..83ef1b2 100644 --- a/app/Views/admin/popup/create_form.php +++ b/app/Views/admin/popup/create_form.php @@ -1,8 +1,8 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> +extend($viewDatas['layout']['layout']) ?> section('content') ?> alertTrait(session('message')) : ""; ?>
-
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_top"); ?>
$label): ?> @@ -17,6 +17,6 @@
"btn btn-outline btn-primary")); ?>
-
include("templates/{$viewDatas['layout']}/form_content_bottom"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_bottom"); ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/popup/index.php b/app/Views/admin/popup/index.php index 5fc6f50..53fda09 100644 --- a/app/Views/admin/popup/index.php +++ b/app/Views/admin/popup/index.php @@ -1,18 +1,14 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> - +extend($viewDatas['layout']['layout']) ?> section('content') ?> alertTrait(session('message')) : ""; ?>
-
include("{$template}/popup/index_header"); ?>
+
include("{$viewDatas['layout']['template']}/popup/index_header"); ?>
- +
- include("{$template}/popup/index_content_filter"); ?> + include("{$viewDatas['layout']['template']}/popup/index_content_filter"); ?> 'batchjob_form', 'method' => "post"]) ?> @@ -44,11 +40,11 @@ $template = "templates" . DIRECTORY_SEPARATOR . "{$viewDatas['layout']}";
- include("{$template}/index_content_bottom"); ?> + include("{$viewDatas['layout']['template']}/index_content_bottom"); ?>
- +
diff --git a/app/Views/admin/popup/modify_form.php b/app/Views/admin/popup/modify_form.php index 2960392..bae98a4 100644 --- a/app/Views/admin/popup/modify_form.php +++ b/app/Views/admin/popup/modify_form.php @@ -1,8 +1,8 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> +extend($viewDatas['layout']['layout']) ?> section('content') ?> alertTrait(session('message')) : ""; ?>
-
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_top"); ?>
$label): ?> @@ -17,6 +17,6 @@
"btn btn-outline btn-primary")); ?>
-
include("templates/{$viewDatas['layout']}/form_content_bottom"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_bottom"); ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/popup/view.php b/app/Views/admin/popup/view.php index 81d484c..c6ba660 100644 --- a/app/Views/admin/popup/view.php +++ b/app/Views/admin/popup/view.php @@ -1,8 +1,8 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> +extend($viewDatas['layout']['layout']) ?> section('content') ?> alertTrait(session('message')) : ""; ?>
-
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_top"); ?>
$label): ?> @@ -12,6 +12,6 @@
-
include("templates/{$viewDatas['layout']}/form_content_bottom"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_bottom"); ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/view.php b/app/Views/admin/view.php index 81d484c..c6ba660 100644 --- a/app/Views/admin/view.php +++ b/app/Views/admin/view.php @@ -1,8 +1,8 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> +extend($viewDatas['layout']['layout']) ?> section('content') ?> alertTrait(session('message')) : ""; ?>
-
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_top"); ?>
$label): ?> @@ -12,6 +12,6 @@
-
include("templates/{$viewDatas['layout']}/form_content_bottom"); ?>
+
include("{$viewDatas['layout']['template']}/form_content_bottom"); ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/welcome.php b/app/Views/admin/welcome.php index e1bf981..f542f2a 100644 --- a/app/Views/admin/welcome.php +++ b/app/Views/admin/welcome.php @@ -1,13 +1,13 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> +extend($viewDatas['layout']['layout']) ?> section('content') ?> -
include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
+
include($viewDatas['layout']['layout'] . '/top'); ?>
- include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?> + include($viewDatas['layout']['layout'] . '/left_menu'); ?> @@ -26,6 +26,6 @@
- -
include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?>
+ +
include($viewDatas['layout']['layout'] . '/bottom'); ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/layouts/admin.php b/app/Views/layouts/admin.php index 075a89d..fe581ea 100644 --- a/app/Views/layouts/admin.php +++ b/app/Views/layouts/admin.php @@ -2,18 +2,12 @@ - <?= LAYOUTS[$viewDatas['layout']]['title'] ?> - - - - - - - - - - - + <?= $viewDatas['layout']['title'] ?> + + + + + - - + +
- include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/base'); ?> - include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/board'); ?> - include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/customer'); ?> - include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/equipment'); ?> - include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/part'); ?> + include($viewDatas['layout']['layout'] . '/left_menu/base'); ?> + include($viewDatas['layout']['layout'] . '/left_menu/board'); ?> + include($viewDatas['layout']['layout'] . '/left_menu/customer'); ?> + include($viewDatas['layout']['layout'] . '/left_menu/equipment'); ?> + include($viewDatas['layout']['layout'] . '/left_menu/part'); ?>
diff --git a/app/Views/layouts/empty.php b/app/Views/layouts/empty.php index 4518dd8..b33d79a 100644 --- a/app/Views/layouts/empty.php +++ b/app/Views/layouts/empty.php @@ -2,18 +2,12 @@ - <?= LAYOUTS[$viewDatas['layout']]['title'] ?> - - - - - - - - - - - + <?= $viewDatas['layout']['title'] ?> + + + + + \ No newline at end of file