dbmsv2 init...1
This commit is contained in:
parent
7849b10ed6
commit
601f874179
@ -20,7 +20,7 @@ class ServerController extends EquipmentController
|
||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||
|
||||
$this->partinfo_cnt_range = array_combine(range(1, 10), range(1, 10));
|
||||
$this->partinfo_cnt_range = array_combine(range(0, 10), range(0, 10));
|
||||
$this->partinfo_extra_options = array_merge(["" => "RAID 선택"], lang("{$this->getService()->getClassName()}.EXTRAS"));
|
||||
}
|
||||
public function getService(): ServerService
|
||||
|
||||
@ -91,8 +91,6 @@ class UserController extends AdminController
|
||||
'formFields' => ['id', 'passwd', 'confirmpassword', 'name', 'email', 'mobile'],
|
||||
]);
|
||||
helper(['form']);
|
||||
//filter_fields에 해당하는 값이 있을 경우 정의
|
||||
$this->setDefaultValues();
|
||||
//기존 Entity 가져오기
|
||||
$entity = $this->getService()->getEntity($uid);
|
||||
if (!$entity) {
|
||||
@ -108,7 +106,7 @@ class UserController extends AdminController
|
||||
protected function profile_modify_process(mixed $entity, array $formDatas): mixed
|
||||
{
|
||||
//데이터 검증
|
||||
$validDatas = $this->doValidate($this->getFieldRules(), $formDatas);
|
||||
$validDatas = $this->doValidate($this->getControlDatas('field_rules'), $formDatas);
|
||||
return $this->getService()->modify($entity, $validDatas);
|
||||
}
|
||||
final public function profile_modify(int $uid): RedirectResponse|string
|
||||
@ -122,7 +120,7 @@ class UserController extends AdminController
|
||||
]);
|
||||
//입력값정의
|
||||
$formDatas = [];
|
||||
foreach ($this->getFormFields() as $field) {
|
||||
foreach ($this->getControlDatas('actionFields') as $field) {
|
||||
$formDatas[$field] = $this->request->getPost($field);
|
||||
}
|
||||
//기존 Entity 가져오기
|
||||
|
||||
@ -97,6 +97,6 @@ class SourceDB extends DBMigration
|
||||
}
|
||||
protected function getPartCode(): array
|
||||
{
|
||||
return $this->executeFile('/home/donfig/dbmsv2/app/Controllers/CLI/DBMigration/dbmsv2_part.txt');
|
||||
return $this->executeFile('/home/donfig/dbmsv2/app/Database/dbmsv2_part.txt');
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,99 +70,70 @@ abstract class CommonController extends BaseController
|
||||
return $this->_myLogService;
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
final protected function getControlDatas(): array
|
||||
final protected function getControlDatas(?string $key = null): mixed
|
||||
{
|
||||
if (!$key) {
|
||||
return $this->_control;
|
||||
}
|
||||
return array_key_exists($key, $this->_control) ? $this->_control[$key] : null;
|
||||
}
|
||||
final protected function setAction(string $action): void
|
||||
{
|
||||
$this->_control['action'] = $action;
|
||||
}
|
||||
final protected function getAction(): string
|
||||
{
|
||||
if (!array_key_exists('action', $this->_control)) {
|
||||
$action = $this->getControlDatas('action');
|
||||
if (!$action) {
|
||||
throw new \Exception("action이 정의되지 않았습니다.");
|
||||
}
|
||||
return $this->_control['action'];
|
||||
return $action;
|
||||
}
|
||||
final protected function getFormFields(): array
|
||||
final protected function initAction(string $action, ?array $actionFields = null): void
|
||||
{
|
||||
return $this->_control['form_fields'] ?? [];
|
||||
}
|
||||
final protected function getFieldRules(): array
|
||||
{
|
||||
return $this->_control['field_rules'] ?? [];
|
||||
}
|
||||
final protected function getIndexFields(): array
|
||||
{
|
||||
return $this->_control['index_fields'] ?? [];
|
||||
}
|
||||
final protected function getViewFields(): array
|
||||
{
|
||||
return $this->_control['view_fields'] ?? [];
|
||||
}
|
||||
final protected function getFilterFields(): array
|
||||
{
|
||||
return $this->_control['filter_fields'] ?? [];
|
||||
}
|
||||
final protected function getBatchjobFields(): array
|
||||
{
|
||||
return $this->_control['batchjob_fields'] ?? [];
|
||||
}
|
||||
final protected function setDefaultValue($field, $value)
|
||||
{
|
||||
if (!array_key_exists('default_values', $this->_control)) {
|
||||
$this->_control['default_values'] = [];
|
||||
}
|
||||
$this->_control['default_values'][$field] = $value;
|
||||
}
|
||||
final protected function setDefaultValues(): void
|
||||
{
|
||||
foreach ($this->getFilterFields() as $field) {
|
||||
$this->setDefaultValue($field, $this->request->getVar($field));
|
||||
}
|
||||
}
|
||||
final protected function getDefaultValue(?string $field = null): mixed
|
||||
{
|
||||
if ($field === null) {
|
||||
return $this->_control['default_values'] ?? [];
|
||||
}
|
||||
return array_key_exists($field, $this->_control['default_values']) ? $this->_control['default_values'][$field] : null;
|
||||
}
|
||||
|
||||
final protected function initAction(string $action, $actionFields = []): void
|
||||
{ //각 Field 초기화
|
||||
$this->setAction($action);
|
||||
switch ($action) {
|
||||
//action Fields정의용
|
||||
switch ($this->getAction()) {
|
||||
case 'view':
|
||||
$actionFields = array_key_exists('view_fields', $actionFields) ? $actionFields : $this->getService()->getViewFields();
|
||||
$fields = $this->_control['view_fields'] = $actionFields['fields'] ?? [];
|
||||
$filters = $this->_control['filter_fields'] = $actionFields['filters'] ?? [];
|
||||
$actionFields = is_array($actionFields) && array_key_exists('fields', $actionFields) ? $actionFields : $this->getService()->getViewFields();
|
||||
break;
|
||||
case 'index':
|
||||
$actionFields = array_key_exists('index_fields', $actionFields) ? $actionFields : $this->getService()->getIndexFields();
|
||||
$fields = $this->_control['index_fields'] = $actionFields['fields'] ?? [];
|
||||
$filters = $this->_control['filter_fields'] = $actionFields['filters'] ?? [];
|
||||
$this->_control['batchjob_fields'] = $actionFields['batchjob_fields'] ?? [];
|
||||
$this->_control['batchjob_buttions'] = $actionFields['batchjob_buttions'] ?? [];
|
||||
$actionFields = is_array($actionFields) && array_key_exists('fields', $actionFields) ? $actionFields : $this->getService()->getIndexFields();
|
||||
$this->_control['batchjob_fields'] = array_key_exists('batchjob_fields', $actionFields) ? $actionFields['batchjob_fields'] : [];
|
||||
$this->_control['batchjob_buttions'] = array_key_exists('batchjob_buttions', $actionFields) ? $actionFields['batchjob_buttions'] : [];
|
||||
break;
|
||||
default:
|
||||
$actionFields = array_key_exists('form_fields', $actionFields) ? $actionFields : $this->getService()->getFormFields();
|
||||
$fields = $this->_control['form_fields'] = $actionFields['fields'] ?? [];
|
||||
$filters = $this->_control['filter_fields'] = $actionFields['filters'] ?? [];
|
||||
$actionFields = is_array($actionFields) && array_key_exists('fields', $actionFields) ? $actionFields : $this->getService()->getFormFields();
|
||||
break;
|
||||
}
|
||||
//action Field정의용
|
||||
$fields = $this->_control['actionFields'] = array_key_exists('fields', $actionFields) ? $actionFields['fields'] : [];
|
||||
//action Filters정의용
|
||||
$filters = $this->_control['actionFilters'] = array_key_exists('filters', $actionFields) ? $actionFields['filters'] : [];
|
||||
//Field Rules정의
|
||||
$this->_control['field_rules'] = [];
|
||||
foreach ($fields as $field) {
|
||||
$this->_control['field_rules'][$field] = $this->getService()->getFormFieldRule($action, $field);
|
||||
}
|
||||
//Form용 Options정의
|
||||
$this->_control['filter_optons'] = [];
|
||||
foreach ($filters as $field) {
|
||||
foreach ($this->getControlDatas('actionFilters') as $field) {
|
||||
$this->_control['filter_optons'][$field] = [];
|
||||
foreach ($this->getService()->getFormFieldOption($field) as $option) {
|
||||
$this->_control['filter_optons'][$field][$option->getPK()] = $option;
|
||||
}
|
||||
}
|
||||
//Paramter로 전달된 Filter Options용 기본값 정의용
|
||||
$this->_control['default_values'] = [];
|
||||
foreach ($this->getControlDatas('actionFilters') as $field) {
|
||||
$this->_control['default_values'][$field] = $this->request->getVar($field);
|
||||
}
|
||||
// echo var_dump($actionFields);
|
||||
// echo var_dump($fields);
|
||||
// echo var_dump($filters);
|
||||
// echo var_dump($this->getControlDatas('actionFields'));
|
||||
// echo var_dump($this->getControlDatas('field_rules'));
|
||||
// exit;
|
||||
}
|
||||
protected function setValidation(Validation $validation, string $field, string $rule): Validation
|
||||
{
|
||||
@ -245,8 +216,7 @@ abstract class CommonController extends BaseController
|
||||
//각 Field 초기화
|
||||
// $this->getMyAuth()->pushCurrentUrl($this->request->getUri()->getPath() . ($this->request->getUri()->getQuery() ? "?" . $this->request->getUri()->getQuery() : ""));
|
||||
$this->initAction(__FUNCTION__);
|
||||
//filter_fields에 해당하는 값이 있을 경우 정의
|
||||
$this->setDefaultValues();
|
||||
//actionFilters에 해당하는 값이 있을 경우 정의
|
||||
$this->create_form_process();
|
||||
helper(['form']);
|
||||
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
||||
@ -259,7 +229,7 @@ abstract class CommonController extends BaseController
|
||||
protected function create_process(array $formDatas): void
|
||||
{
|
||||
//데이터 검증
|
||||
$validDatas = $this->doValidate($this->getFieldRules(), $formDatas);
|
||||
$validDatas = $this->doValidate($this->getControlDatas('field_rules'), $formDatas);
|
||||
$this->entity = $this->getService()->create($validDatas);
|
||||
}
|
||||
final public function create(): RedirectResponse|string
|
||||
@ -270,7 +240,7 @@ abstract class CommonController extends BaseController
|
||||
$this->initAction(__FUNCTION__);
|
||||
//입력값정의
|
||||
$formDatas = [];
|
||||
foreach ($this->getFormFields() as $field) {
|
||||
foreach ($this->getControlDatas('actionFields') as $field) {
|
||||
$formDatas[$field] = $this->request->getPost($field);
|
||||
}
|
||||
// dd($formDatas);
|
||||
@ -293,8 +263,6 @@ abstract class CommonController extends BaseController
|
||||
//각 Field 초기화
|
||||
// $this->getMyAuth()->pushCurrentUrl($this->request->getUri()->getPath() . ($this->request->getUri()->getQuery() ? "?" . $this->request->getUri()->getQuery() : ""));
|
||||
$this->initAction(__FUNCTION__);
|
||||
//filter_fields에 해당하는 값이 있을 경우 정의
|
||||
$this->setDefaultValues();
|
||||
//기존 Entity 가져오기
|
||||
$entity = $this->getService()->getEntity($uid);
|
||||
if (!$entity) {
|
||||
@ -311,7 +279,7 @@ abstract class CommonController extends BaseController
|
||||
protected function modify_process(mixed $entity, array $formDatas): void
|
||||
{
|
||||
//데이터 검증
|
||||
$validDatas = $this->doValidate($this->getFieldRules(), $formDatas);
|
||||
$validDatas = $this->doValidate($this->getControlDatas('field_rules'), $formDatas);
|
||||
$this->entity = $this->getService()->modify($entity, $validDatas);
|
||||
}
|
||||
final public function modify(int $uid): RedirectResponse|string
|
||||
@ -323,7 +291,7 @@ abstract class CommonController extends BaseController
|
||||
$this->initAction(__FUNCTION__);
|
||||
//입력값정의
|
||||
$formDatas = [];
|
||||
foreach ($this->getFormFields() as $field) {
|
||||
foreach ($this->getControlDatas('actionFields') as $field) {
|
||||
$formDatas[$field] = $this->request->getPost($field);
|
||||
}
|
||||
//기존 Entity 가져오기
|
||||
@ -343,7 +311,7 @@ abstract class CommonController extends BaseController
|
||||
final protected function toggle_process(mixed $entity, array $formDatas): void
|
||||
{
|
||||
//데이터 검증
|
||||
$validDatas = $this->doValidate($this->getFieldRules(), $formDatas);
|
||||
$validDatas = $this->doValidate($this->getControlDatas('field_rules'), $formDatas);
|
||||
$this->entity = $this->getService()->modify($entity, $validDatas);
|
||||
}
|
||||
final public function toggle(mixed $uid, string $field): RedirectResponse|string
|
||||
@ -379,7 +347,7 @@ abstract class CommonController extends BaseController
|
||||
LogCollector::debug(__METHOD__ . "에서 {$uid}에 대한 정보를 찾을수 없습니다.");
|
||||
} else {
|
||||
//데이터 검증
|
||||
$validDatas = $this->doValidate($this->getFieldRules(), $formDatas);
|
||||
$validDatas = $this->doValidate($this->getControlDatas('field_rules'), $formDatas);
|
||||
$entities[] = $this->getService()->modify($entity, $validDatas);
|
||||
}
|
||||
}
|
||||
@ -409,7 +377,7 @@ abstract class CommonController extends BaseController
|
||||
throw new \Exception("적용할 리스트을 선택하셔야합니다.");
|
||||
}
|
||||
//각 Field 초기화: 일괄작업은 선택된 조건항목 Field만 존재하므로 Field와 Rule을 정의
|
||||
$this->initAction(__FUNCTION__, ['fields' => [['fields' => $selectedFields, 'filters' => $selectedFields]]]);
|
||||
$this->initAction(__FUNCTION__, ['fields' => [$selectedFields], 'filters' => [$selectedFields]]);
|
||||
$this->batchjob_process($uids, $formDatas);
|
||||
$this->_db->transCommit();
|
||||
LogCollector::debug(sprintf("%s에서 총 %s개중 %s개 일괄작업을 완료하였습니다.", __METHOD__, count($uids), count($this->entities)));
|
||||
@ -492,8 +460,6 @@ abstract class CommonController extends BaseController
|
||||
try {
|
||||
//각 Field 초기화
|
||||
$this->initAction(__FUNCTION__);
|
||||
//filter_fields에 해당하는 값이 있을 경우 정의
|
||||
$this->setDefaultValues();
|
||||
//기존 Entity 가져오기
|
||||
$entity = $this->getService()->getEntity($uid);
|
||||
if (!$entity) {
|
||||
@ -512,10 +478,9 @@ abstract class CommonController extends BaseController
|
||||
//조건절 처리
|
||||
final protected function setConditionForList(): void
|
||||
{
|
||||
$this->setDefaultValues();
|
||||
//Filter 조건절 처리
|
||||
foreach ($this->getFilterFields() as $field) {
|
||||
$default_value = $this->getDefaultValue($field);
|
||||
foreach ($this->_control['actionFilters'] as $field) {
|
||||
$default_value = $this->request->getVar($field);
|
||||
if ($default_value !== null && $default_value !== '') {
|
||||
$this->getService()->setList_FormFilter($field, $default_value);
|
||||
}
|
||||
|
||||
@ -4,13 +4,13 @@
|
||||
"settings": {
|
||||
"width": 3000,
|
||||
"height": 3000,
|
||||
"scrollTop": -1410.0603,
|
||||
"scrollLeft": -924.0128,
|
||||
"scrollTop": -1555.0603,
|
||||
"scrollLeft": -563.9615,
|
||||
"zoomLevel": 1,
|
||||
"show": 511,
|
||||
"database": 4,
|
||||
"databaseName": "",
|
||||
"canvasType": "ERD",
|
||||
"canvasType": "@dineug/erd-editor/builtin-schema-sql",
|
||||
"language": 1,
|
||||
"tableNameCase": 4,
|
||||
"columnNameCase": 2,
|
||||
@ -10416,19 +10416,19 @@
|
||||
"id": "hK2hK1Xs1GrDW5nUTroIR",
|
||||
"tableId": "B8haiEbPc1lRBWTv1g25G",
|
||||
"name": "amount",
|
||||
"comment": "서비스금액(<=서버 최종금액)",
|
||||
"comment": " 월별서비스금액(서버+PART+IP+CS)",
|
||||
"dataType": "INT",
|
||||
"default": "0",
|
||||
"options": 8,
|
||||
"ui": {
|
||||
"keys": 0,
|
||||
"widthName": 60,
|
||||
"widthComment": 161,
|
||||
"widthComment": 195,
|
||||
"widthDataType": 60,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1755593484931,
|
||||
"updateAt": 1755828755759,
|
||||
"createAt": 1755245428349
|
||||
}
|
||||
},
|
||||
@ -12277,18 +12277,18 @@
|
||||
"tableId": "ZMGIWLFEswObjH2Sx0NlW",
|
||||
"name": "type",
|
||||
"comment": "형식",
|
||||
"dataType": "ENUM('CPU','RAM','DISK','SOFTWARE')",
|
||||
"dataType": "VARCHAR(20)",
|
||||
"default": "",
|
||||
"options": 8,
|
||||
"ui": {
|
||||
"keys": 0,
|
||||
"widthName": 60,
|
||||
"widthComment": 60,
|
||||
"widthDataType": 206,
|
||||
"widthDataType": 75,
|
||||
"widthDefault": 60
|
||||
},
|
||||
"meta": {
|
||||
"updateAt": 1755488402952,
|
||||
"updateAt": 1755830599213,
|
||||
"createAt": 1755486399420
|
||||
}
|
||||
},
|
||||
|
||||
@ -4,11 +4,12 @@ CPU,Xeon X5560 2.8Ghz 8Core,80000
|
||||
CPU,Xeon X5650 2.6Ghz 12Core,100000
|
||||
CPU,Xeon E5-2690v2 2.6Ghz 12Core,100000
|
||||
CPU,Xeon E5-2690v4 3.0Ghz 20Core,150000
|
||||
RAM,ECC 2G,20000
|
||||
RAM,ECC 4G,30000
|
||||
RAM,ECC 8G,40000
|
||||
RAM,ECC 16G,60000
|
||||
RAM,ECC 32G,100000
|
||||
RAM,2G,20000
|
||||
RAM,4G,30000
|
||||
RAM,8G,40000
|
||||
RAM,16G,60000
|
||||
RAM,32G,100000
|
||||
RAM,64G,100000
|
||||
DISK,SATA 128G,50000
|
||||
DISK,SATA 256G,70000
|
||||
DISK,SATA 512G,90000
|
||||
@ -23,19 +24,21 @@ DISK,SSD 2T,150000
|
||||
DISK,NVME 512G,120000
|
||||
DISK,NVME 1T,150000
|
||||
DISK,NVME 2T,180000
|
||||
SOFTWARE,Windows 10,10000
|
||||
SOFTWARE,Windows 11,20000
|
||||
SOFTWARE,Windows NT 2008R2,30000
|
||||
SOFTWARE,Windows NT 2012R2,30000
|
||||
SOFTWARE,Windows NT 2016R2,30000
|
||||
SOFTWARE,Windows NT 2019R2,30000
|
||||
SOFTWARE,Windows MSSQL 2008,10000
|
||||
SOFTWARE,Windows MSSQL 2012,10000
|
||||
SOFTWARE,CentOS 7,10000
|
||||
SOFTWARE,CentOS 8,10000
|
||||
SOFTWARE,CentOS 9,10000
|
||||
SOFTWARE,Ununtu 20.04,10000
|
||||
SOFTWARE,Ununtu 21.04,10000
|
||||
SOFTWARE,Ununtu 22.04,10000
|
||||
OS,Windows 10,10000
|
||||
OS,Windows 11,20000
|
||||
OS,Windows NT 2008R2,30000
|
||||
OS,Windows NT 2012R2,30000
|
||||
OS,Windows NT 2016R2,30000
|
||||
OS,Windows NT 2019R2,30000
|
||||
OS,CentOS 7,10000
|
||||
OS,CentOS 8,10000
|
||||
OS,CentOS 9,10000
|
||||
OS,Ununtu 20.04,10000
|
||||
OS,Ununtu 21.04,10000
|
||||
OS,Ununtu 22.04,10000
|
||||
DB,Windows MSSQL 2008,10000
|
||||
DB,Windows MSSQL 2012,10000
|
||||
DB,Mysql,10000
|
||||
DB,Postgress,10000
|
||||
SOFTWARE,닷디펜더,50000
|
||||
SOFTWARE,딥파인더,50000
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -27,6 +27,10 @@ abstract class CommonEntity extends Entity
|
||||
$field = constant("static::TITLE");
|
||||
return $this->attributes[$field];
|
||||
}
|
||||
public function getStatus(): string|null
|
||||
{
|
||||
return $this->attributes['status'] ?? null;
|
||||
}
|
||||
final public function getUpdatedAt(): string|null
|
||||
{
|
||||
return $this->attributes['updated_at'];
|
||||
@ -39,12 +43,4 @@ abstract class CommonEntity extends Entity
|
||||
{
|
||||
return $this->attributes['created_at'];
|
||||
}
|
||||
public function getPrice(): string
|
||||
{
|
||||
return $this->attributes['price'];
|
||||
}
|
||||
public function getStatus(): string|null
|
||||
{
|
||||
return $this->attributes['status'] ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,4 +17,12 @@ class PartEntity extends EquipmentEntity
|
||||
{
|
||||
return $this->attributes['type'];
|
||||
}
|
||||
public function getPrice(): int
|
||||
{
|
||||
return (int) $this->attributes['price'];
|
||||
}
|
||||
public function getFormTitle(): string
|
||||
{
|
||||
return number_format($this->getPrice()) . "원," . $this->getTitle();
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,4 +6,5 @@ class FormOptionEntity extends CommonEntity
|
||||
{
|
||||
const PK = "uid";
|
||||
const TITLE = "title";
|
||||
const DEFAULT_STATUS = null;
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ class CommonHelper
|
||||
}
|
||||
|
||||
// header.php에서 getFieldForm_Helper사용
|
||||
protected function form_dropdown_disabled(string $field, mixed $value, array $viewDatas, array $extras = [], mixed $disabledKey = null): string
|
||||
protected function form_dropdown_custom(string $field, mixed $value, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
$extra = "";
|
||||
foreach ($extras as $extra_tag => $extra_value) {
|
||||
@ -225,9 +225,8 @@ class CommonHelper
|
||||
$html .= "<option value=\"\">" . lang("{$viewDatas['class_path']}.label.{$field}") . " 선택" . "</option>";
|
||||
foreach ($viewDatas['control']['filter_optons'][$field] as $key => $entity) {
|
||||
$isSelected = $key == $value ? ' selected' : '';
|
||||
// disabledKey가 설정되어 있으면 해당 키를 disabled로 설정
|
||||
$isDisabled = $disabledKey !== null && $entity->getStatus() === $disabledKey ? ' disabled' : '';
|
||||
$html .= sprintf("<option value=\"%s\"%s%s>%s</option>", $key, $isSelected, $isDisabled, $entity->getTitle());
|
||||
$isDisabled = $entity->getStatus() === $entity::DEFAULT_STATUS ? '' : ' disabled';
|
||||
$html .= sprintf("<option value=\"%s\"%s%s>%s</option>", $key, $isSelected, $isDisabled, array_key_exists('isForm', $extras) ? $entity->getFormTitle() : $entity->getTitle());
|
||||
}
|
||||
$html .= '</select>';
|
||||
return $html;
|
||||
@ -258,7 +257,7 @@ class CommonHelper
|
||||
}
|
||||
$form = implode(" ", $forms);
|
||||
} else {
|
||||
$form = $this->form_dropdown_disabled($field, $value, $viewDatas, $extras);
|
||||
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||
}
|
||||
break;
|
||||
case 'issue_at':
|
||||
@ -283,11 +282,11 @@ class CommonHelper
|
||||
case 'serviceinfo_uid':
|
||||
case 'serverinfo_uid':
|
||||
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
||||
$form = $this->form_dropdown_disabled($field, $value, $viewDatas, $extras);
|
||||
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
$form = $this->form_dropdown_disabled($field, $value, $viewDatas, $extras);
|
||||
if (in_array($field, $viewDatas['control']['actionFilters'])) {
|
||||
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||
} else {
|
||||
$form = form_input($field, $value ?? "", $extras);
|
||||
}
|
||||
@ -318,7 +317,7 @@ class CommonHelper
|
||||
$value = number_format($value) . "원";
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
if (in_array($field, $viewDatas['control']['actionFilters'])) {
|
||||
//index 액션에서만 filter_options를 변경시 선택된 값을 변경하는 기능
|
||||
if ($viewDatas['control']['action'] == 'index') {
|
||||
$extras["onChange"] = sprintf(
|
||||
|
||||
@ -15,7 +15,7 @@ class AccountHelper extends CustomerHelper
|
||||
{
|
||||
switch ($field) {
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
if (in_array($field, $viewDatas['control']['actionFilters'])) {
|
||||
$value = array_key_exists($value, $viewDatas['control']['filter_optons'][$field]) ? $viewDatas['control']['filter_optons'][$field][$value]->getTitle() : "";
|
||||
}
|
||||
break;
|
||||
|
||||
@ -15,7 +15,7 @@ class CouponHelper extends CustomerHelper
|
||||
{
|
||||
switch ($field) {
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
if (in_array($field, $viewDatas['control']['actionFilters'])) {
|
||||
$value = array_key_exists($value, $viewDatas['control']['filter_optons'][$field]) ? $viewDatas['control']['filter_optons'][$field][$value]->getTitle() : "";
|
||||
}
|
||||
break;
|
||||
|
||||
@ -16,7 +16,7 @@ class PointHelper extends CustomerHelper
|
||||
{
|
||||
switch ($field) {
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
if (in_array($field, $viewDatas['control']['actionFilters'])) {
|
||||
$value = array_key_exists($value, $viewDatas['control']['filter_optons'][$field]) ? $viewDatas['control']['filter_optons'][$field][$value]->getTitle() : "";
|
||||
}
|
||||
break;
|
||||
|
||||
@ -48,7 +48,7 @@ class ServiceHelper extends CustomerHelper
|
||||
switch ($field) {
|
||||
case 'switchinfo_uid':
|
||||
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
||||
$form = $this->form_dropdown_disabled($field, $value, $viewDatas, $extras);
|
||||
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||
break;
|
||||
default:
|
||||
$form = parent::getFieldForm($field, $value, $viewDatas, $extras);
|
||||
|
||||
@ -11,20 +11,6 @@ class ServerHelper extends EquipmentHelper
|
||||
parent::__construct();
|
||||
$this->setTitleField(field: ServerModel::TITLE);
|
||||
}
|
||||
private function getPartFormOption(string $field, array $viewDatas): array
|
||||
{
|
||||
$options = ["" => lang("{$viewDatas['class_path']}.label.{$field}") . " 선택"];
|
||||
foreach ($viewDatas['control']['filter_optons'][$field] as $key => $entity) {
|
||||
$options[$key] = $entity->getTitle();
|
||||
}
|
||||
// foreach ($viewDatas['control']['filter_optons'][$field] as $key => $entity) {
|
||||
// if (!array_key_exists($entity->getType(), $options)) {
|
||||
// $options[$entity->getType()] = [];
|
||||
// }
|
||||
// $options[$entity->getType()][$key] = $entity->getTitle();
|
||||
// }
|
||||
return $options;
|
||||
}
|
||||
public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
switch ($field) {
|
||||
@ -36,20 +22,20 @@ class ServerHelper extends EquipmentHelper
|
||||
case 'partinfo_cpu_uid':
|
||||
case 'partinfo_ram_uid':
|
||||
case 'partinfo_software_uid':
|
||||
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
||||
$form = form_dropdown($field, $this->getPartFormOption($field, $viewDatas), $value, $extras);
|
||||
$form .= " " . form_dropdown("{$field}_cnt", $viewDatas['partinfo_cnt_range'], $value ?? 1) . "개";
|
||||
break;
|
||||
case 'partinfo_disk_uid':
|
||||
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
||||
$form = form_dropdown($field, $this->getPartFormOption($field, $viewDatas), $value, $extras);
|
||||
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||
$form .= " " . form_dropdown("{$field}_cnt", $viewDatas['partinfo_cnt_range'], $value ?? 1) . "개";
|
||||
if ($field === 'partinfo_disk_uid') {
|
||||
$form .= form_dropdown("{$field}_extra", $viewDatas['partinfo_extra_options'], $value ?? 1);
|
||||
}
|
||||
break;
|
||||
case 'partinfo_uid':
|
||||
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
||||
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||
case 'ipinfo_uid':
|
||||
case 'csinfo_uid':
|
||||
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
||||
$form = $this->form_dropdown_disabled($field, $value, $viewDatas, $extras);
|
||||
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||
break;
|
||||
default:
|
||||
$form = parent::getFieldForm($field, $value, $viewDatas, $extras);
|
||||
@ -65,12 +51,9 @@ class ServerHelper extends EquipmentHelper
|
||||
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
||||
$form = parent::getListFilter($field, $value, $viewDatas, $extras);
|
||||
break;
|
||||
case 'partinfo_cpu_uid':
|
||||
case 'partinfo_ram_uid':
|
||||
case 'partinfo_software_uid':
|
||||
case 'partinfo_disk_uid':
|
||||
case 'partinfo_uid':
|
||||
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
||||
$form = form_dropdown($field, $this->getPartFormOption($field, $viewDatas), $value, $extras);
|
||||
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||
break;
|
||||
default:
|
||||
$form = parent::getListFilter($field, $value, $viewDatas, $extras);
|
||||
|
||||
@ -48,7 +48,7 @@ class HomeHelper extends CommonHelper
|
||||
$value = implode("<BR>", $temps);
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
if (in_array($field, $viewDatas['control']['actionFilters'])) {
|
||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
} else {
|
||||
|
||||
@ -18,7 +18,7 @@ class MyLogHelper extends CommonHelper
|
||||
$value = nl2br($value);
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||
if (in_array($field, $viewDatas['control']['actionFilters'])) {
|
||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||
} else {
|
||||
|
||||
@ -6,7 +6,7 @@ return [
|
||||
'serviceinfo_uid' => "서비스번호",
|
||||
'code' => "장비번호",
|
||||
'type' => "장비벤더",
|
||||
'title' => "장비명",
|
||||
'title' => "모델명",
|
||||
'price' => "기본금액",
|
||||
'total_price' => "최종금액",
|
||||
'manufactur_at' => "입고일",
|
||||
@ -21,7 +21,9 @@ return [
|
||||
'partinfo_cpu_uid' => "CPU",
|
||||
'partinfo_ram_uid' => "RAM",
|
||||
'partinfo_disk_uid' => "DISK",
|
||||
'partinfo_software_uid' => "소프트웨어",
|
||||
'partinfo_os_uid' => "OS",
|
||||
'partinfo_db_uid' => "DB",
|
||||
'partinfo_software_uid' => "기타SW",
|
||||
],
|
||||
"TITLE" => [
|
||||
'HP DL360 Gen6' => "HP DL360 Gen6",
|
||||
|
||||
@ -26,18 +26,17 @@ class GoogleService extends AuthService
|
||||
public function getFormFields(): array
|
||||
{
|
||||
return [
|
||||
"access_code",
|
||||
'fields' => ["access_code"],
|
||||
'filters' => [],
|
||||
];
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
public function getIndexFields(): array
|
||||
{
|
||||
return [];
|
||||
return [
|
||||
'fields' => ["access_code"],
|
||||
'filters' => [],
|
||||
];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function login(array $formDatas): UserEntity
|
||||
{
|
||||
try {
|
||||
|
||||
@ -42,7 +42,6 @@ class IPService extends EquipmentService
|
||||
'lineinfo_uid',
|
||||
'ip',
|
||||
'price',
|
||||
'amount',
|
||||
'status',
|
||||
'clientinfo_uid',
|
||||
'serverinfo_uid',
|
||||
|
||||
@ -26,7 +26,7 @@ class ServerService extends EquipmentService
|
||||
"partinfo_cpu_uid",
|
||||
"partinfo_ram_uid",
|
||||
"partinfo_disk_uid",
|
||||
"partinfo_software_uid",
|
||||
"partinfo_os_uid",
|
||||
"price",
|
||||
"manufactur_at",
|
||||
"format_at",
|
||||
@ -40,7 +40,7 @@ class ServerService extends EquipmentService
|
||||
"partinfo_cpu_uid",
|
||||
"partinfo_ram_uid",
|
||||
"partinfo_disk_uid",
|
||||
"partinfo_software_uid",
|
||||
"partinfo_os_uid",
|
||||
"status"
|
||||
],
|
||||
];
|
||||
@ -51,6 +51,7 @@ class ServerService extends EquipmentService
|
||||
'fields' => [
|
||||
'clientinfo_uid',
|
||||
'serviceinfo_uid',
|
||||
'partinfo_uid',
|
||||
"type",
|
||||
'title',
|
||||
'price',
|
||||
@ -59,8 +60,8 @@ class ServerService extends EquipmentService
|
||||
"format_at",
|
||||
'status'
|
||||
],
|
||||
'filters' => ['clientinfo_uid', 'serviceinfo_uid', 'type', 'status'],
|
||||
'batchjob_fields' => ['clientinfo_uid', 'type', 'status'],
|
||||
'filters' => ['clientinfo_uid', 'serviceinfo_uid', 'type', 'partinfo_uid', 'status'],
|
||||
'batchjob_fields' => ['clientinfo_uid', 'partinfo_uid', 'status'],
|
||||
'batchjob_buttions' => [
|
||||
'batchjob' => '일괄 처리',
|
||||
'batchjob_delete' => '일괄 삭제',
|
||||
@ -95,34 +96,41 @@ class ServerService extends EquipmentService
|
||||
switch ($field) {
|
||||
case 'partinfo_cpu_uid':
|
||||
$options = $this->getPartService()->getEntities([
|
||||
'type' => 'CPU',
|
||||
'status' => PartEntity::STATUS_AVAILABLE
|
||||
'type' => 'CPU'
|
||||
]);
|
||||
break;
|
||||
case 'partinfo_ram_uid':
|
||||
$options = $this->getPartService()->getEntities([
|
||||
'type' => 'RAM',
|
||||
'status' => PartEntity::STATUS_AVAILABLE
|
||||
'type' => 'RAM'
|
||||
]);
|
||||
break;
|
||||
case 'partinfo_disk_uid':
|
||||
$options = $this->getPartService()->getEntities([
|
||||
'type' => 'DISK',
|
||||
'status' => PartEntity::STATUS_AVAILABLE
|
||||
'type' => 'DISK'
|
||||
]);
|
||||
break;
|
||||
case 'partinfo_os_uid':
|
||||
$options = $this->getPartService()->getEntities([
|
||||
'type' => 'OS'
|
||||
]);
|
||||
break;
|
||||
case 'partinfo_db_uid':
|
||||
$options = $this->getPartService()->getEntities([
|
||||
'type' => 'DB'
|
||||
]);
|
||||
break;
|
||||
case 'partinfo_software_uid':
|
||||
$options = $this->getPartService()->getEntities([
|
||||
'type' => 'SOFTWARE',
|
||||
'status' => PartEntity::STATUS_AVAILABLE
|
||||
'type' => 'SOFTWARE'
|
||||
]);
|
||||
break;
|
||||
case 'partinfo_uid': //수정때문에 전체가 필요
|
||||
$options = $this->getPartService()->getEntities();
|
||||
break;
|
||||
case 'ipinfo_uid': //수정때문에 전체가 필요
|
||||
// $options = $this->getIPService()->getEntities(['status' => IPEntity::STATUS_AVAILABLE]);
|
||||
$options = $this->getIPService()->getEntities();
|
||||
break;
|
||||
case 'csinfo_uid': //수정때문에 전체가 필요
|
||||
// $options = $this->getCSService()->getEntities(['status' => CSEntity::STATUS_AVAILABLE]);
|
||||
$options = $this->getCSService()->getEntities();
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<div class="action_form">
|
||||
<table class="table table-bordered">
|
||||
<?php foreach ($viewDatas['control']['form_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<tr>
|
||||
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||
<td nowrap class="text-start">
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<th><?= lang("{$viewDatas['class_path']}.label.{$field}") ?></th>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
@ -11,7 +11,7 @@
|
||||
<?php foreach ($viewDatas['entities'] as $entity): ?>
|
||||
<?php $viewDatas['entity'] = $entity; ?>
|
||||
<tr>
|
||||
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="index_head_short_column">번호</th>
|
||||
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||
<?php endforeach ?>
|
||||
<th class="index_head_short_column">작업</th>
|
||||
@ -34,7 +34,7 @@
|
||||
<tr <?= $viewDatas['entity']->getStatus() === $viewDatas['entity']::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>>
|
||||
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
|
||||
<td nowrap><?= $viewDatas['helper']->getListButton('modify', '', $viewDatas) ?></td>
|
||||
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
|
||||
<?php endforeach ?>
|
||||
<td nowrap>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<?= form_open(current_url(), ['id' => 'action_form', ...$viewDatas['forms']['attributes']], $viewDatas['forms']['hiddens']) ?>
|
||||
<div class="action_form">
|
||||
<table class="table table-bordered">
|
||||
<?php foreach ($viewDatas['control']['form_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<tr>
|
||||
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||
<td nowrap class="text-start">
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<div class="action_form">
|
||||
<table class="table table-bordered">
|
||||
<?php foreach ($viewDatas['control']['form_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<tr>
|
||||
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||
<td nowrap class="text-start">
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="index_head_short_column">번호</th>
|
||||
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||
<?php endforeach ?>
|
||||
<th class="index_head_short_column">작업</th>
|
||||
@ -24,7 +24,7 @@
|
||||
<tr <?= $viewDatas['entity']->getStatus() === $viewDatas['entity']::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>>
|
||||
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
|
||||
<td nowrap><?= $viewDatas['helper']->getListButton('modify', '', $viewDatas) ?></td>
|
||||
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
|
||||
<?php endforeach ?>
|
||||
<td nowrap>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="index_head_short_column">번호</th>
|
||||
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||
<?php endforeach ?>
|
||||
<th class="index_head_short_column">작업</th>
|
||||
@ -35,7 +35,7 @@
|
||||
<tr <?= $viewDatas['entity']->getStatus() === $viewDatas['entity']::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>>
|
||||
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
|
||||
<td nowrap><?= $viewDatas['helper']->getListButton('modify', '', $viewDatas) ?></td>
|
||||
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
|
||||
<?php endforeach ?>
|
||||
<td nowrap>
|
||||
@ -45,7 +45,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="<?= count($viewDatas['control']['index_fields']) + 2 ?>">
|
||||
<td colspan="<?= count($viewDatas['control']['actionFields']) + 2 ?>">
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<tr><?php foreach (SERVICE_ITEM_TYPES as $item_type => $label): ?><th data-rtc-resizable="<?= $item_type ?>" nowrap><?= $viewDatas['helper']->getFieldLabel($item_type, $label, $viewDatas) ?></th><?php endforeach ?></tr>
|
||||
<tr><?php foreach (SERVICE_ITEM_TYPES as $item_type => $label): ?><td class="text-nowrap"><?= $viewDatas['helper']->getFieldView($item_type, $entity->$item_type, $viewDatas) ?></td><?php endforeach ?></tr>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="index_head_short_column">번호</th>
|
||||
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||
<?php endforeach ?>
|
||||
<th class="index_head_short_column">작업</th>
|
||||
@ -35,7 +35,7 @@
|
||||
<tr <?= $viewDatas['helper']->getListRowColor($entity) ?>>
|
||||
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
|
||||
<td nowrap><?= $viewDatas['helper']->getListButton('modify', '', $viewDatas) ?></td>
|
||||
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
|
||||
<?php endforeach ?>
|
||||
<td nowrap>
|
||||
@ -45,7 +45,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="<?= count($viewDatas['control']['index_fields']) + 2 ?>">
|
||||
<td colspan="<?= count($viewDatas['control']['actionFields']) + 2 ?>">
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<tr><?php foreach (SERVER_LINK_ITEMS as $item_type => $label): ?><th data-rtc-resizable="<?= $item_type ?>" nowrap><?= $viewDatas['helper']->getFieldLabel($item_type, $label, $viewDatas) ?></th><?php endforeach ?></tr>
|
||||
<tr><?php foreach (SERVER_LINK_ITEMS as $item_type => $label): ?><td class="text-nowrap"><?= $viewDatas['helper']->getFieldView($item_type, $entity->$item_type, $viewDatas) ?></td><?php endforeach ?></tr>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<table class="table table-bordered">
|
||||
<?php foreach ($viewDatas['control']['view_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<tr>
|
||||
<th nowrap class="text-end" width="15%"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||
<td nowrap class="text-start" width="15%"><?= $viewDatas['helper']->getFieldView($field, $viewDatas['entity']->$field, $viewDatas) ?></td>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<link href="/css/<?= $viewDatas['layout'] ?>/form.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div class="action_form">
|
||||
<table class="table table-bordered">
|
||||
<?php foreach ($viewDatas['control']['view_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||
<tr>
|
||||
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||
<td nowrap class="text-start"><?= $viewDatas['helper']->getFieldView($field, $viewDatas['entity']->$field, $viewDatas) ?></td>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="container-fluid">
|
||||
<nav class="condition nav">
|
||||
조건:
|
||||
<?php foreach ($viewDatas['control']['filter_fields'] as $field): ?>
|
||||
<?php foreach ($viewDatas['control']['actionFilters'] as $field): ?>
|
||||
<?= $viewDatas['helper']->getListFilter($field, $viewDatas['control']['default_values'][$field] ?? old($field), $viewDatas, ['id' => $field]) ?>
|
||||
<?php endforeach ?>
|
||||
</nav>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user