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.

50 lines
1.3 KiB

  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\DetailView;
  4. /* @var $this yii\web\View */
  5. /* @var $model backend\modules\shop\models\ars\Delivery */
  6. $this->title = $model->id;
  7. $this->params['breadcrumbs'][] = ['label' => 'Deliveries', 'url' => ['index']];
  8. $this->params['breadcrumbs'][] = $this->title;
  9. \yii\web\YiiAsset::register($this);
  10. ?>
  11. <div class="delivery-view">
  12. <p>
  13. <?= Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
  14. </p>
  15. <?= DetailView::widget([
  16. 'model' => $model,
  17. 'attributes' => [
  18. 'id',
  19. 'order_id',
  20. 'shipping_name',
  21. 'shipping_id',
  22. [
  23. 'attribute' => 'type',
  24. 'value' => function ($model) {
  25. return \backend\modules\shop\models\ars\Delivery::dropDown('type', $model->type);
  26. }
  27. ],
  28. 'status',
  29. 'decription:ntext',
  30. [
  31. 'attribute' => 'created_at',
  32. 'value' => function ($model) {
  33. return date('Y-m-d H:i:s', $model->created_at);
  34. }
  35. ],
  36. [
  37. 'attribute' => 'updated_at',
  38. 'value' => function ($model) {
  39. return date('Y-m-d H:i:s', $model->updated_at);
  40. }
  41. ],
  42. ],
  43. ]) ?>
  44. </div>