add totals to frontend collection/index

This commit is contained in:
2015-11-04 16:36:40 +01:00
parent cee5d60d9d
commit 9751e7756e
2 changed files with 16 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
use yii\helpers\Html;
use yii\grid\GridView;
use common\components\AccountTotalWidget;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\CollectionSearch */
@@ -15,6 +16,16 @@ $this->params['breadcrumbs'][] = $this->title;
<h1><?= Html::encode($this->title) ?></h1>
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
<div class="row">
<div class="col-md-4 ">
<?php
echo AccountTotalWidget::widget([
'statistic' => $searchModel->totals
])?>
</div>
</div>
<?= GridView::widget([
'dataProvider' => $dataProvider,