view.php 1.39 KB
<?php
    
    use common\models\Persone;
    use yii\helpers\Html;
    use yii\web\View;
    use yii\widgets\DetailView;
    use yiister\gentelella\widgets\Panel;
    
    /**
     * @var View    $this
     * @var Persone $model
     */
    
    $this->title = $model->id;
    $this->params[ 'breadcrumbs' ][] = [
        'label' => Yii::t('app', 'Персонал'),
        'url'   => [ 'index' ],
    ];
    $this->params[ 'breadcrumbs' ][] = $this->title;
?>
<div class="persone-view">
    
    <?php Panel::begin(
        [
            'header' => $this->title,
        ]
    ) ?>
  
  <p>
      <?= Html::a(
          Yii::t('app', 'Обновить'),
          [
              'update',
              'id' => $model->id,
          ],
          [ 'class' => 'btn btn-primary' ]
      ) ?>
      <?= Html::a(
          Yii::t('app', 'Delete'),
          [
              'delete',
              'id' => $model->id,
          ],
          [
              'class' => 'btn btn-danger',
              'data'  => [
                  'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
                  'method'  => 'post',
              ],
          ]
      ) ?>
  </p>
    
    <?= DetailView::widget(
        [
            'model'      => $model,
            'attributes' => [
                'id',
                'image_id',
            ],
        ]
    ) ?>
    
    <?php Panel::end() ?>

</div>