<?php

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

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '人才计算器';
$this->params['breadcrumbs'][] = $this->title;
?>
<?php $this->beginBlock('content-header'); ?>
<?= $this->title . ' ' . Html::a(Yii::t('common', '现代产业'), ['create?type=industry'], ['class' => 'btn btn-success']) ?>
<?= Html::a(Yii::t('common', '高等教育'), ['create?type=education'], ['class' => 'btn btn-success','style'=>'margin-left:10px']) ?>
<?= Html::a(Yii::t('common', '医疗卫生'), ['create?type=medical'], ['class' => 'btn btn-success','style'=>'margin-left:10px']) ?>
<?= Html::a(Yii::t('common', '集成电路'), ['create?type=circuit'], ['class' => 'btn btn-success','style'=>'margin-left:10px']) ?>
<?php $this->endBlock(); ?>
<div class="box box-success">
    <div class="box-body">
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [

            'id',
//            [
//                'attribute' => 'use_layout',
//                'value' => function ($model) {
//                    $arr = ['不使用', '使用'];
//                    return $arr[$model->use_layout];
//                },
//            ],
            'title',
            'slug',

            ['class' => 'common\helpers\DiyActionColumn'],
        ],
    ]); ?>
    </div>
</div>
