fitness-web/backend/views/product/index.php
2015-09-24 22:14:09 +02:00

52 lines
1.2 KiB
PHP

<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\ProductSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('common/product', 'Products');
$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(Yii::t('common/product', 'Create Product'), ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[
'attribute' => 'name',
],
[
'attribute' => 'id_product_category',
'value' => 'productCategoryName',
],
[
'attribute' => 'id_account',
'value' => 'accountName',
],
'product_number',
'barcode',
'sale_price',
[
'attribute' => 'status',
'value' => 'statusHuman',
],
['class' => 'yii\grid\ActionColumn',
'template' => '{view} {update}'
],
],
]); ?>
</div>