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

43 lines
1.1 KiB
PHP

<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\Product */
$this->title = $model->name ;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/product', 'Products'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="product-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a(Yii::t('common/product', 'Update'), ['update', 'id' => $model->id_product], ['class' => 'btn btn-primary']) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'productCategoryName',
'accountName',
'product_number',
'barcode',
'purchase_price',
'sale_price',
'profit_margins',
'statusHuman',
[
'attribute' => 'description',
'value' => nl2br($model->description),
'format' => 'raw'
],
'created_at:datetime',
'updated_at:datetime',
],
]) ?>
</div>