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