title = $model->name; $this->params['breadcrumbs'][] = ['label' => 'Express Templates', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; \yii\web\YiiAsset::register($this); ?>
= Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
= DetailView::widget([ 'model' => $model, 'attributes' => [ 'id', 'name', [ 'attribute' => 'calculation_type', 'value' => function ($model) { return ExpressTemplate::$calculationType[$model->calculation_type]; } ], 'basic_price', 'basic_count', 'extra_price', 'extra_count', 'updated_at:datetime', 'created_at:datetime', ['attribute' => 'city', 'value' => function ($model) { $array = explode(',', $model->city); $cities = []; foreach (\backend\modules\shop\models\ars\City::find()->andWhere(['in', 'city_id', $array])->all() as $city) { $cities[] = $city->name; } return implode(' // ', $cities); }, ], ], ]) ?>