new balance
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
<?php
|
||||
|
||||
use yii\grid\GridView;
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $dataProviderF \yii\data\ActiveDataProvider
|
||||
/* @var $model backend\modules\balance\models\Balance */
|
||||
|
||||
$this->title = 'Баланс №' . $model->id;
|
||||
@ -12,8 +14,9 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="balance-view">
|
||||
<p>
|
||||
<?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Delete', ['delete', 'id' => $model->id], [
|
||||
<?= Html::a('Список', ['index'], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Редактировать', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Удалить', ['delete', 'id' => $model->id], [
|
||||
'class' => 'btn btn-danger',
|
||||
'data' => [
|
||||
'confirm' => 'Are you sure you want to delete this item?',
|
||||
@ -25,11 +28,30 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'id',
|
||||
'type',
|
||||
//'id',
|
||||
[
|
||||
'attribute' => 'type',
|
||||
'value' => function($model){
|
||||
return \common\models\Balance::getTypeName($model->type);
|
||||
}
|
||||
],
|
||||
'summ',
|
||||
'dt_add',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
<h2>Дополнительные сведения</h2>
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProviderF,
|
||||
'layout' => "{items}",
|
||||
'columns' => [
|
||||
'field.name:text:Поле',
|
||||
[
|
||||
'attribute' => 'value',
|
||||
'label' => 'Значение'
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user