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

48 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/ticket_type', '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/ticket_type', 'Create Product'), ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[
'attribute' => 'id_product_type',
'value' => 'productCategoryName',
],
[
'attribute' => 'id_account',
'value' => 'accountName',
],
'product_number',
'barcode',
'purchase_price',
'sale_price',
'profit_margins',
'status',
'description',
'created_at:datetime',
'updated_at:datetime',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>