guild/backend/modules/project/views/project-mark/view.php
2023-01-23 17:50:52 +03:00

45 lines
1.4 KiB
PHP

<?php
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\project\models\ProjectMark */
$this->title = 'Проект: ' . $model->project->name . '; Метка: ' . $model->mark->title;
$this->params['breadcrumbs'][] = ['label' => 'Project Marks', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
?>
<div class="project-mark-view">
<p>
<?= Html::a('Список', ['index', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Изменить', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Удалитть', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
[
'attribute' => 'project_id',
'value' => ArrayHelper::getValue($model, 'project.name' ),
],
[
'attribute' => 'mark_id',
'value' => ArrayHelper::getValue($model, 'mark.title' ),
]
],
]) ?>
</div>