guild/backend/modules/company/views/company-manager/view.php

45 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2022-12-01 14:11:29 +03:00
<?php
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\company\models\CompanyManager */
$this->title = 'Менеджер: ' . $model->userCard->fio;
$this->params['breadcrumbs'][] = ['label' => 'Company Managers', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
?>
<div class="company-manager-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' => 'company_id',
'value' => ArrayHelper::getValue($model, 'company.name'),
],
[
'attribute' => 'user_card_id',
'value' => ArrayHelper::getValue($model, 'userCard.fio'),
],
],
]) ?>
</div>