Exemple #1
0
?>

<div style="margin-bottom: 5px">
    <table width="100%">
        <tbody>
            <tr>  
                <td>
                    <span class="pg-title" >Produtos</span>
                </td>
                <td>    
                    <?php 
echo Html::a('Adicionar', ['create'], ['class' => 'btn btn-success pull-right']);
?>
   
                </td>
            </tr>
        </tbody>
    </table>
</div>

<div class="User-default-index">
   
   <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $search, 'layout' => '{items}{pager}', 'columns' => ['id', 'reference', 'description', 'price', 'stock', ['attribute' => 'status', 'format' => 'text', 'content' => function ($data) {
    return \common\enum\ProductStatus::toName($data->status);
}], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}']]]);
?>
    
</div>