<div class="employee-payment-index p-4">
<h1><?= Html::encode($this->title) ?></h1>
- <?= Html::a('Добавить нового сотрудника', ['create'], ['class' => 'btn btn-success mb-4']) ?>
+
+ <?php if (Yii::$app->user->identity && Yii::$app->user->identity->hasPermission('employee-paymentEdit')): ?>
+ <?= Html::a('Добавить нового сотрудника', ['create'], ['class' => 'btn btn-success mb-4']) ?>
+ <?php endif; ?>
+
<?php Pjax::begin(); ?>
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
<h1><?= Html::encode($this->title) ?></h1>
<p>
- <?= Html::a('Добавить запись', ['create', 'admin_id' => $admin->id], ['class' => 'btn btn-success']) ?>
+ <?php if (Yii::$app->user->identity && Yii::$app->user->identity->hasPermission('employee-paymentEdit')): ?>
+ <?= Html::a('Добавить запись', ['create', 'admin_id' => $admin->id], ['class' => 'btn btn-success']) ?>
+ <?php endif; ?>
+
<?= Html::a('Назад', ['index'], ['class' => 'btn btn-danger']) ?>
</p>