You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php
use backend\modules\shop\models\ars\Area; use backend\modules\shop\models\ars\City; use backend\modules\shop\models\ars\Province; use yii\helpers\Html; use yii\widgets\DetailView;
/* @var $this yii\web\View */ /* @var $model backend\models\ars\TakingSite */
$this->title = $model->name; $this->params['breadcrumbs'][] = ['label' => 'Taking Sites', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; \yii\web\YiiAsset::register($this); ?>
<div class="taking-site-view">
<p> <?= Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
</p>
<?= DetailView::widget([ 'model' => $model, 'attributes' => [ 'id', 'name', [ 'attribute' => 'province', 'value' => function ($model) { $province = Province::findOne(['province_id' => $model->province]); if ($province) { return $province->name; } } ], [ 'attribute' => 'city', 'value' => function ($model) { $city = City::findOne(['city_id' => $model->city]); if ($city) { return $city->name; } } ], [ 'attribute' => 'area', 'value' => function ($model) { $area = Area::findOne(['area_id' => $model->area]); if ($area) { return $area->name; } } ], 'address:ntext', 'updated_at:datetime', 'created_at:datetime', ], ]) ?>
</div>
|