示例#1
0
use source\modules\dict\models\DictCategory;
use source\core\grid\ActionColumn;
/* @var $this yii\web\View */
/* @var $searchModel source\models\search\DictSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = '字典管理';
echo source\libs\Message::getMessage();
?>
<div class="page-header">
    <h3>
        <strong><?php 
echo Html::encode($this->title);
?>
</strong>
        <small><?php 
echo Html::encode(DictCategory::getDictCategoryName($category_id));
?>
</small>
        <div class="pull-right">
            <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . LsYii::gT('添加字典'), ['/dict/dict/create', 'category_id' => $category_id], ['class' => 'btn btn-primary']);
?>
            <?php 
echo Html::a('<span class="glyphicon glyphicon-share-alt"></span> ' . LsYii::gT('Return'), ['/dict/dictcategory/index'], ['class' => 'btn btn-primary']);
?>
        </div>
    </h3>
</div>
<div class="dict-index">
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'layout' => '{items} {summary} {pager}', 'tableOptions' => ['class' => 'table table-hover'], 'columns' => [['attribute' => 'name'], ['attribute' => 'value'], ['attribute' => 'status', 'filter' => \source\libs\Constants::getDictStatus(), 'content' => function ($model, $key, $index, $gridView) {
示例#2
0
<?php

use source\helpers\Html;
use yii\grid\GridView;
use source\LsYii;
use source\modules\dict\models\Dict;
use source\modules\dict\models\DictCategory;
/* @var $this yii\web\View */
/* @var $model source\models\Dict */
$this->title = '修改字典';
echo source\libs\Message::getMessage();
?>
<div class="page-header">
    <h3>
        <strong><?php 
echo Html::encode($this->title);
?>
</strong>
        <small><?php 
echo Html::encode(DictCategory::getDictCategoryName($category_id) . '-' . $model->name);
?>
</small>
    </h3>
</div>
<div class="dict-update">
    <?php 
echo $this->render('_form', ['model' => $model, 'category_id' => $category_id]);
?>

</div>