<?php

/* @var $this yii\web\View */

use common\models\Article;
use yii\helpers\Url;

$this->title = '控制面板';
?>
<div class="site-index">

    <div class="jumbotron">
        <div class="row">
            <div class="col-md-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-green">
                    <div class="inner">
                        <h3><?= Article::find()->published()->count() ?><sup style="font-size: 20px">个</sup></h3>
                        <p>人才统计</p>
                    </div>
                    <div class="icon">
                        <i class="fa fa-book"></i>
                    </div>
                    <a href="<?= Url::to(['/article/index']) ?>" class="small-box-footer" target="_blank">更多信息 <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div><!-- ./col -->
            <div class="col-md-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-red">
                    <div class="inner">
                        <h3><?= \common\models\Category::find()->where(['type' => 0])->active()->count() ?><sup style="font-size: 20px">个</sup></h3>
                        <p>分类统计</p>
                    </div>
                    <div class="icon">
                        <i class="fa fa-book"></i>
                    </div>
                    <a href="<?= Url::to(['/category/index']) ?>" class="small-box-footer" target="_blank">更多信息 <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div><!-- ./col -->
            <div class="col-md-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-red">
                    <div class="inner">
                        <h3><?= \common\models\Category::find()->where(['type' => 0])->active()->andWhere(['!=', 'pid', 0])->count() ?><sup style="font-size: 20px">个</sup></h3>
                        <p>二级分类</p>
                    </div>
                    <div class="icon">
                        <i class="fa fa-book"></i>
                    </div>
                    <a href="<?= Url::to(['/category/index']) ?>" class="small-box-footer" target="_blank">更多信息 <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div><!-- ./col -->
            <div class="col-md-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-red">
                    <div class="inner">
                        <h3><?= \common\models\Category::find()->where(['type' => 1])->active()->count() ?><sup style="font-size: 20px">个</sup></h3>
                        <p>产业链</p>
                    </div>
                    <div class="icon">
                        <i class="fa fa-book"></i>
                    </div>
                    <a href="<?= Url::to(['/category/index']) ?>" class="small-box-footer" target="_blank">更多信息 <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div><!-- ./col -->

        </div><!-- /.row -->
    </div>

</div>