<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel backend\models\WasteSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = Yii::t('common/waste', 'Selejtek');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="waste-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php   echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a(Yii::t('common/waste', 'Új selejt'), ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
			
        	[
        		'attribute' => "waste_created_at",
        		'label' => "Létrehozva"
    		],
        	[
        		'attribute' => "user_username",
        		'label' => "Felhasználó"
    		],
        	[
        		'attribute' => "product_name",
        		'label' => "Termék"
    		],
        	[
        		'attribute' => "waste_count",
        		'label' => "Mennyiség"
    		],
        	[
        		'attribute' => "waste_comment",
        		'label' => "Megjegyzés"
    		],
			
           // ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>

</div>
