guild/backend/modules/project/views/project-user/view.php

50 lines
1.5 KiB
PHP
Raw Normal View History

2021-11-23 14:58:28 +03:00
<?php
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
2021-12-20 17:49:11 +03:00
use yii\web\YiiAsset;
2021-11-23 14:58:28 +03:00
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\project\models\ProjectUser */
$this->title = 'Сотрудник проекта: ' . $model->project->name;
$this->params['breadcrumbs'][] = ['label' => 'Project Users', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
2021-12-20 17:49:11 +03:00
YiiAsset::register($this);
2021-11-23 14:58:28 +03:00
?>
<div class="project-user-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' => 'user_id',
'value' => ArrayHelper::getValue($model, 'user.username' ),
],
2021-12-20 17:49:11 +03:00
[
'attribute' => 'card_id',
'value' => ArrayHelper::getValue($model, 'card.fio' ),
],
2021-11-23 14:58:28 +03:00
],
]) ?>
</div>