shoppingmallv2 init...
This commit is contained in:
parent
7340071493
commit
e2acba3aca
@ -24,6 +24,8 @@ class OrderController extends AdminController
|
|||||||
break;
|
break;
|
||||||
case "index":
|
case "index":
|
||||||
case "excel":
|
case "excel":
|
||||||
|
return ["user_uid", "name", "cost", "sale", "quantity", "price", "status", "updated_at", "created_at"];
|
||||||
|
break;
|
||||||
case "view":
|
case "view":
|
||||||
return ["user_uid", 'product_uid', "name", "cost", "sale", "quantity", "price", "status", "updated_at", "created_at"];
|
return ["user_uid", 'product_uid', "name", "cost", "sale", "quantity", "price", "status", "updated_at", "created_at"];
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -15,4 +15,13 @@ class OrderEntity extends BaseEntity
|
|||||||
return $this->attributes['name'];
|
return $this->attributes['name'];
|
||||||
}
|
}
|
||||||
//추가기능
|
//추가기능
|
||||||
|
public function getOrderHint()
|
||||||
|
{
|
||||||
|
$hints = explode("-", $this->getPrimaryKey());
|
||||||
|
return sprintf(
|
||||||
|
"%s-**-%s",
|
||||||
|
str_split($hints[0], 3)[0],
|
||||||
|
str_split($hints[count($hints) - 1], 5)[0]
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,10 +109,15 @@ function getFieldIndex_Row_OrderHelper($field, $entity, array $viewDatas): strin
|
|||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'title':
|
case 'title':
|
||||||
case 'name':
|
case 'name':
|
||||||
return anchor(
|
return sprintf(
|
||||||
|
"<div class=\"location-left\">%s : %s</div>%s",
|
||||||
|
lang("{$viewDatas['className']}.label.uid"),
|
||||||
|
$entity->getOrderHint(),
|
||||||
|
anchor(
|
||||||
current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category']->getPrimaryKey(),
|
current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category']->getPrimaryKey(),
|
||||||
$value,
|
$value,
|
||||||
["target" => "_self"]
|
["target" => "_self"]
|
||||||
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -127,23 +132,29 @@ function getFieldIndex_Row_OrderHelper_Admin($field, $entity, array $viewDatas):
|
|||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'title':
|
case 'title':
|
||||||
case 'name':
|
case 'name':
|
||||||
return anchor(
|
return sprintf(
|
||||||
|
"<div class=\"location-left\">%s : %s</div>%s",
|
||||||
|
lang("{$viewDatas['className']}.label.uid"),
|
||||||
|
$entity->getPrimaryKey(),
|
||||||
|
anchor(
|
||||||
current_url() . '/view/' . $entity->getPrimaryKey(),
|
current_url() . '/view/' . $entity->getPrimaryKey(),
|
||||||
$value,
|
$value,
|
||||||
["target" => "_self"]
|
["target" => "_self"]
|
||||||
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (in_array($field, $viewDatas['fieldFilters'])) {
|
//관리자도 수정할수 없게 하기위해
|
||||||
$attributes["onChange"] = sprintf(
|
// if (in_array($field, $viewDatas['fieldFilters'])) {
|
||||||
'location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value',
|
// $attributes["onChange"] = sprintf(
|
||||||
current_url(),
|
// 'location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value',
|
||||||
$entity->getPrimaryKey(),
|
// current_url(),
|
||||||
$field,
|
// $entity->getPrimaryKey(),
|
||||||
$field
|
// $field,
|
||||||
);
|
// $field
|
||||||
return getFieldForm_OrderHelper($field, $entity->$field, $viewDatas, $attributes);
|
// );
|
||||||
}
|
// return getFieldForm_OrderHelper($field, $entity->$field, $viewDatas, $attributes);
|
||||||
|
// }
|
||||||
return getFieldIndex_Row_OrderHelper($field, $entity, $viewDatas);
|
return getFieldIndex_Row_OrderHelper($field, $entity, $viewDatas);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
return [
|
return [
|
||||||
'title' => "주문 정보",
|
'title' => "주문 정보",
|
||||||
'label' => [
|
'label' => [
|
||||||
'uid' => "번호",
|
'uid' => "주문ID",
|
||||||
'product_uid' => "상품정보",
|
'product_uid' => "상품정보",
|
||||||
'sess_id' => "세션ID",
|
'sess_id' => "세션ID",
|
||||||
'user_uid' => "사용자정보",
|
'user_uid' => "사용자정보",
|
||||||
|
|||||||
@ -14,13 +14,13 @@
|
|||||||
font: Arial;
|
font: Arial;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* user class */
|
|
||||||
h1,h2,h3,h4,h5,h6,strong,th,.bold{font-weight:500;}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* user class */
|
||||||
|
h1,h2,h3,h4,h5,h6,strong,th,.bold{font-weight:500;}
|
||||||
|
|
||||||
input[type=text],input[type=password]{
|
input[type=text],input[type=password]{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
@ -39,3 +39,5 @@ a:link { text-decoration: none; }
|
|||||||
a:visited { text-decoration: none; }
|
a:visited { text-decoration: none; }
|
||||||
a:hover { text-decoration: underline; }
|
a:hover { text-decoration: underline; }
|
||||||
a:active { text-decoration: underline; }
|
a:active { text-decoration: underline; }
|
||||||
|
|
||||||
|
div.location-left { text-align:left; }
|
||||||
Loading…
Reference in New Issue
Block a user