servermgrv2 init...
This commit is contained in:
parent
ed4276402e
commit
8de509546e
19
app/Entities/BaseHierarchyEntity.php
Normal file
19
app/Entities/BaseHierarchyEntity.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities;
|
||||
|
||||
abstract class BaseHierarchyEntity extends BaseEntity
|
||||
{
|
||||
final public function getHierarchy_No()
|
||||
{
|
||||
return $this->attributes['grpno'];
|
||||
}
|
||||
final public function getHierarchy_Order()
|
||||
{
|
||||
return $this->attributes['grporder'];
|
||||
}
|
||||
final public function getHierarchy_Depth()
|
||||
{
|
||||
return $this->attributes['grpdepth'];
|
||||
}
|
||||
}
|
||||
@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Entities;
|
||||
|
||||
use App\Entities\BaseEntity;
|
||||
|
||||
class BoardConfigEntity extends BaseEntity
|
||||
{
|
||||
protected $datamap = [];
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
|
||||
namespace App\Entities;
|
||||
|
||||
use App\Entities\BaseEntity;
|
||||
|
||||
class BoardEntity extends BaseEntity
|
||||
class BoardEntity extends BaseHierarchyEntity
|
||||
{
|
||||
protected $datamap = [];
|
||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Entities;
|
||||
|
||||
use App\Entities\BaseEntity;
|
||||
|
||||
class UserEntity extends BaseEntity
|
||||
{
|
||||
protected $datamap = [];
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Entities;
|
||||
|
||||
use App\Entities\BaseEntity;
|
||||
|
||||
class UserSNSEntity extends BaseEntity
|
||||
{
|
||||
protected $datamap = [];
|
||||
|
||||
@ -94,7 +94,20 @@ function getFieldIndex_Row_BoardHelper($field, $entity, array $fieldFilters, $fi
|
||||
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case 'title':
|
||||
return anchor(current_url() . '/view/' . $entity->getPrimaryKey(), $value, [...$attributes, "target" => "_self"]);
|
||||
return anchor(
|
||||
current_url() . '/view/' . $entity->getPrimaryKey(),
|
||||
$value,
|
||||
[
|
||||
...$attributes,
|
||||
"style" => sprintf("padding-left:%spx", $entity->getHierarchy_Depth() * DEFAULTS['HIERARCHY_GRPDEPTH']),
|
||||
"target" => "_self"
|
||||
]
|
||||
) .
|
||||
anchor(
|
||||
current_url() . '/reply/' . $entity->getPrimaryKey(),
|
||||
ICONS["REPLY"],
|
||||
["target" => "_self"]
|
||||
);
|
||||
break;
|
||||
case 'board_file':
|
||||
case 'upload_file':
|
||||
|
||||
@ -2,11 +2,13 @@
|
||||
<!-- panel-body -->
|
||||
</div>
|
||||
<!-- panel panel-default -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
||||
<script src="/vendors/tinymce/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
|
||||
<script type="text/javascript">
|
||||
//날짜field용
|
||||
$(document).ready(function() {
|
||||
//class calender인 inputbox용
|
||||
//class가 calender인 inputbox용,날짜field용
|
||||
$(".calender").datepicker({
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
@ -25,6 +27,10 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
//class가 select-field인 SelectBox용
|
||||
$(".select-field").select2({
|
||||
theme: "bootstrap-5",
|
||||
});
|
||||
//class가 editor인 textarea용
|
||||
tinymce.init({
|
||||
selector: '.editor',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user