Por si sirve de algo os posteo por aquí el código del index de la vista:
<?php
use common\components\widgets\GridViewWidget;
use yii\helpers\Html;
use yii\helpers\Url;
$this->params['title'] = Yii::t('app', 'Documentos');
$this->params['breadcrumbs'][] = [
'label' => $this->params['title'],
];
?>
<div class="page-menu">
<div class="btn-group dropdown">
<button class="btn btn-default dropdown-toggle dropdown-toggle-icon" data-toggle="dropdown" type="button" aria-expanded="false"><?= Yii::t('app', 'Acciones') ?><i class="dropdown-caret" style="margin-left: 5px"></i></button>
<ul class="dropdown-menu dropdown-menu-right">
<?php if (Yii::$app->user->can('createEmployeeDocument')) { ?>
<li><a href="<?= Url::to(["employee/document/upload"]) ?>"><?= Yii::t('app', 'Subir documento') ?></a></li>
<?php } ?>
<div class="form-group field-document" style="margin-bottom: 20px;margin-top:20px;">
<li><a style="width:150px;padding-left:15px;" href="<?= Url::to(["employee/document/upload"]) ?>"><?= Yii::t('app', ' Subir documentos') ?></a></li>
<div class="col-md-6">
</ul>
</div>
</div>
<?= GridViewWidget::widget([
'id' => 'user-table',
'dataProvider' => $employeeDocumentDataProvider,
'filterModel' => $employeeDocumentSearchModel,
'pjax' => true,
'bordered' => false,
'striped' => false,
'condensed' => false,
'responsive' => true,
'hover' => true,
'checks' => true,
'contextMenu' => false,
'tableOptions' => ['class' => 'clickable'],
'clickAction' => 'redirectUser($(this))',
'refreshButton' => true,
'headerRowOptions' => ['class' => 'kartik-sheet-style'],
'filterRowOptions' => ['class' => 'kartik-sheet-style'],
'rowOptions' => function ($employeeDocumentModel) {
if ($employeeDocumentModel) {
return [
'class' => is_null($employeeDocumentModel->enabled) ? 'warning' : (!$employeeDocumentModel->enabled ? 'danger' : ''),
'data-enabled' => is_null($employeeDocumentModel->enabled) ? 0 : (!$employeeDocumentModel->enabled ? 0 : 1),
];
}
},
'columns' => [
[
'vAlign' => 'middle',
'format' => 'raw',
'width' => '32px',
'value' => function ($employeeDocumentModel) {
return Html::img($employeeDocumentModel->employeeDocumentUrl ?: Url::to(['/img/default-document.png']), ['class' => 'img-circle img-document media-object', 'style' => 'margin-top: 32px;']);
},
],
[
'attribute' => 'user_id',
'vAlign' => 'middle',
],
[
'attribute' => 'name',
'vAlign' => 'middle',
],
[
'attribute' => 'employee_document_date',
'vAlign' => 'middle',
],
[
'attribute' => 'type',
'vAlign' => 'middle',
],
],
]);
?>