<?php

use yii\helpers\Html;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use yii\grid\GridView;
use app\components\Utilities;
use yii\mongodb\Query;

$this->title = Yii::t('app', 'Reports');

?>

<div class="reports-index">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('Add Report', ['builder'], ['class' => 'btn btn-success btn-expanded']) ?>
    </p>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            [
                'attribute' => 'name',
                'headerOptions' => ['style' => 'width: 30%;'],
            ],
            [
                'attribute' => 'description',
                'headerOptions' => ['style' => 'width: 60%;'],
            ],
            [
                'class' => 'yii\grid\ActionColumn',
                'headerOptions' => ['style' => 'width: 10%;'],
                'template' => '{view} {update} {delete}',
            ],
        ],
    ]); ?>
</div>