<?php
    
    use yii\helpers\Html;
    use yii\widgets\DetailView;
    use yiister\gentelella\widgets\Panel;
    
    /* @var $this yii\web\View */
    /* @var $model artbox\core\models\Feedback */
    
    $this->title = $model->name;
    $this->params[ 'breadcrumbs' ][] = [
        'label' => Yii::t('core', 'Feedbacks'),
        'url'   => [ 'index' ],
    ];
    $this->params[ 'breadcrumbs' ][] = $this->title;
?>

<?php $panel = Panel::begin(
    [
        'header'  => $this->title,
        'options' => [
            'class' => 'x_panel feedback-view',
        ],
    ]
); ?>

<p>
    <?= Html::a(
        Yii::t('core', 'Update'),
        [
            'update',
            'id' => $model->id,
        ],
        [ 'class' => 'btn btn-primary' ]
    ) ?>
    <?= Html::a(
        Yii::t('core', 'Delete'),
        [
            'delete',
            'id' => $model->id,
        ],
        [
            'class' => 'btn btn-danger',
            'data'  => [
                'confirm' => Yii::t('core', 'Are you sure you want to delete this item?'),
                'method'  => 'post',
            ],
        ]
    ) ?>
</p>

<?= DetailView::widget(
    [
        'model'      => $model,
        'attributes' => [
            'id',
            'name',
            'email:email',
            'phone',
            'message:ntext',
            [
                'attribute' => 'created_at',
                'format'    => [
                    'datetime',
                    'php:d.m.Y H:i',
                ],
            ],
            'ip',
            'url:url',
            'status:boolean',
        ],
    ]
) ?>

<?php $panel::end(); ?>
