Exemple #1
0
<?php

use source\LsYii;
use source\helpers\Html;
use source\core\widgets\ActiveForm;
use source\helpers\Url;
use source\libs\Constants;
use source\libs\Message;
/* @var $this yii\web\View */
/* @var $model backend\models\config\BasicConfig */
/* @var $form ActiveForm */
$this->title = LsYii::gT('Register And Visit');
echo Message::getMessage();
?>
<div class="page-header">
    <h3>
        <strong><?php 
echo Html::encode($this->title);
?>
</strong>
    </h3>
</div>
<div class="config-basic">
    <?php 
$form = ActiveForm::begin(['id' => 'access-config-form', 'options' => ['class' => 'form-horizontal']]);
?>

        <?php 
echo $form->field($model, 'allow_register')->checkbox([], false);
?>
Exemple #2
0
<?php

use source\helpers\Html;
use yii\grid\GridView;
use source\LsYii;
use source\modules\dict\models\DictCategory;
/* @var $this yii\web\View */
/* @var $searchModel source\models\search\DictCategorySearch */
/* @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>
        <div class="pull-right">
            <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . LsYii::gT('添加字典分类'), ['/dict/dictcategory/create'], ['class' => 'btn btn-primary']);
?>
        </div>
    </h3>
</div>
<div class="dict-category-index">
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'layout' => '{items} {summary} {pager}', 'tableOptions' => ['class' => 'table table-hover'], 'columns' => ['id', 'name', 'description', ['class' => 'source\\core\\grid\\ActionColumn', 'template' => '{view} {update} {delete}', 'buttons' => ['view' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', source\helpers\Url::to(['/dict/dict/index', 'category_id' => $model->id]), []);
}]]]]);
?>