add collections to backend
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
use common\components\AccountStatisticWidget;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Collection */
|
||||
@@ -14,31 +15,30 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('backend/collection', 'Update'), ['update', 'id' => $model->id_collection], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a(Yii::t('backend/collection', 'Delete'), ['delete', 'id' => $model->id_collection], [
|
||||
'class' => 'btn btn-danger',
|
||||
'data' => [
|
||||
'confirm' => Yii::t('backend/collection', 'Are you sure you want to delete this item?'),
|
||||
'method' => 'post',
|
||||
],
|
||||
]) ?>
|
||||
</p>
|
||||
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'id_collection',
|
||||
'id_user',
|
||||
'created_by',
|
||||
'id_account',
|
||||
'money',
|
||||
'start',
|
||||
'end',
|
||||
'type',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
[
|
||||
'attribute' =>'id_user',
|
||||
'value' => $model->userName
|
||||
],
|
||||
[
|
||||
'attribute' =>'id_account',
|
||||
'value' => $model->accountName
|
||||
],
|
||||
'money:integer',
|
||||
'start:datetime',
|
||||
'end:datetime',
|
||||
'created_at:datetime',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
<?php
|
||||
echo AccountStatisticWidget::widget([
|
||||
'totals' => $totals
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user