add totals to frontend collection/index
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user