<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel backend\models\search\ShareLevelSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = Yii::t('common', 'Share Levels');
$this->params['breadcrumbs'][] = $this->title;
?>
<?php $this->beginBlock('content-header') ?>
<?= $this->title . ' ' . Html::a(Yii::t('common', 'Create Share Level'), ['create'], ['class' => 'btn btn-success']) ?>
<?php $this->endBlock() ?>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>

<div class="box box-success">
    <div class="box-body">
        <?= GridView::widget([
            'dataProvider' => $dataProvider,
            'filterModel' => $searchModel,
            'columns' => [
                'id',
                'title',
                'sale_rate:percent',
                'direct_rate:percent',
                'put_on_rate:percent',
                'price:currency',
                [
                        'attribute' => 'upgrade_limit',
                        'format' => ['suffix', '个初级合伙人']
                ],


                [
                        'attribute' => 'base_limit',
                        'format' => ['suffix', '个销售订单']
                ],



//                     'created_at',
//                     'updated_at',
                // 'status',

                ['class' => 'yii\grid\ActionColumn'],
            ],
        ]); ?>
    </div>
</div>
