<commit_before><?php

use backend\ext\User\BUserRbac;
use backend\modules\auth\models\AdminCrud\AdminCrudSearch;
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;

/* @var $this yii\web\View */
/* @var $searchModel AdminCrudSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Admins-Crud';
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="product-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
    <p>
        <?= Html::a('Create Product', ['create'], ['class' => 'btn-sm btn-success']) ?>
    </p>


    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            [
                'class' => 'yii\grid\CheckboxColumn',
                // you may configure additional properties here
            ],
            'username',
            //'role',
            [
                'attribute' => 'role',
                'value' => function ($data) {
                    return BUserRbac::getRoleName($data->role);
                },
                'filter' => BUserRbac::getRolesList()
            ],
            'status',
            'created_at',
//            [
//                'attribute' => 'category_id',
//                'value' => function ($model) {
//                    return empty($model->category_id) ? '-' : $model->category->title;
//                },
//            ],

            [
                'class' => 'yii\grid\ActionColumn',
                'template' => '{view} {update} {delete}',
//                'buttons' => [
//                    'images' => function ($url, $model, $key) {
//                         return Html::a(
//                             '<span class="glyphicon glyphicon glyphicon-picture" aria-hidden="true"></span>',
//                             Url::to(['image/index', 'id' => $model->id])
//                         );
//                    }
//                ],
            ],
        ],
    ]); ?>

</div><commit_msg>fix filter as dropdowns<commit_after><?php

use backend\ext\User\BUserRbac;
use backend\modules\auth\models\AdminCrud\AdminCrudSearch;
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;

/* @var $this yii\web\View */
/* @var $searchModel AdminCrudSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Admins-Crud';
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="product-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
    <p>
        <?= Html::a('Create Product', ['create'], ['class' => 'btn-sm btn-success']) ?>
    </p>


    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            [
                'class' => 'yii\grid\CheckboxColumn',
                // you may configure additional properties here
            ],
            'username',
            //'role',
            [
                'attribute' => 'role',
                'value' => function ($data) {
                    return BUserRbac::getRoleName($data->role);
                },
                'filter' => BUserRbac::getRolesList()
            ],
            'status',
            'created_at',
//            [
//                'attribute' => 'created_at',
//                'format' => ['date', 'php:Y-m-d']
//            ],

            [
                'class' => 'yii\grid\ActionColumn',
                'template' => '{view} {update} {delete}',
//                'buttons' => [
//                    'images' => function ($url, $model, $key) {
//                         return Html::a(
//                             '<span class="glyphicon glyphicon glyphicon-picture" aria-hidden="true"></span>',
//                             Url::to(['image/index', 'id' => $model->id])
//                         );
//                    }
//                ],
            ],
        ],
    ]); ?>

</div>
{'fraction_non_alphanumeric': 0.188050930460333, 'fraction_numerical': 0.0009794319294809011, 'mean_word_length': 1.4667874396135265, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 78, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '970437', 'n_tokens_mistral': 1223, 'n_tokens_neox': 1183, 'n_words': 199}