use yii\helpers\Html; use yii\widgets\DetailView; use simplator\admin\Module; /* @var $this yii\web\View */ /* @var $model simplator\admin\models\Name */ $this->title = $model->title; $this->params['breadcrumbs'][] = ['label' => Module::t('admin', 'Names'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="name-view"> <h1><?php echo Html::encode($this->title); ?> </h1> <p> <?php echo Html::a(Module::t('admin', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']); ?> <?php echo Html::a(Module::t('admin', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Module::t('admin', 'Are you sure you want to delete this item?'), 'method' => 'post']]); ?> </p> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'section', 'key', 'type', 'title', 'more']]); ?> </div>
<?php use yii\helpers\Html; use yii\grid\GridView; use simplator\admin\Module; /* @var $this yii\web\View */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Module::t('admin', 'Names'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="name-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <p> <?php echo Html::a(Module::t('admin', 'Create Name'), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'section', 'key', 'type', 'title', ['class' => 'yii\\grid\\ActionColumn']]]); ?> </div>
* @var yii\data\ActiveDataProvider $dataProvider */ $this->title = Module::t('admin', 'admin'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="setting-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php //echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a(Module::t('admin', 'Create {modelClass}', ['modelClass' => Module::t('admin', 'Setting')]), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php Pjax::begin(); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => ['id', ['attribute' => 'section', 'filter' => ArrayHelper::map(Setting::find()->select('section')->distinct()->where('section <> ""')->all(), 'section', 'section')], 'key', 'user', 'value:ntext', ['class' => '\\pheme\\grid\\ToggleColumn', 'attribute' => 'active', 'filter' => [1 => Yii::t('yii', 'Yes'), 0 => Yii::t('yii', 'No')]], ['class' => 'yii\\grid\\ActionColumn']]]); ?> <?php Pjax::end(); ?> </div>
/** * @inheritdoc */ public function attributeLabels() { return ['id' => Module::t('admin', 'ID'), 'type' => Module::t('admin', 'Type'), 'user' => Module::t('admin', 'User'), 'section' => Module::t('admin', 'Section'), 'key' => Module::t('admin', 'Key'), 'value' => Module::t('admin', 'Value'), 'active' => Module::t('admin', 'Active'), 'created' => Module::t('admin', 'Created'), 'modified' => Module::t('admin', 'Modified')]; }
<?php /** * @link http://phe.me * @copyright Copyright (c) 2014 Pheme * @license MIT http://opensource.org/licenses/MIT */ use yii\helpers\Html; use simplator\admin\Module; /** * @var yii\web\View $this * @var simplator\admin\models\Setting $model */ $this->title = Module::t('admin', 'Update {modelClass}: ', ['modelClass' => Module::t('admin', 'Setting')]) . ' ' . $model->section . '.' . $model->key; $this->params['breadcrumbs'][] = ['label' => Module::t('admin', 'admin'), 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]]; $this->params['breadcrumbs'][] = Module::t('admin', 'Update'); ?> <div class="setting-update"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php echo $this->render('_form', ['model' => $model]); ?> </div>
/** * @link http://phe.me * @copyright Copyright (c) 2014 Pheme * @license MIT http://opensource.org/licenses/MIT */ use yii\helpers\Html; use yii\grid\GridView; use simplator\admin\Module; use simplator\admin\models\Setting; use yii\helpers\ArrayHelper; use yii\widgets\Pjax; use simplator\admin\widgets\SmallBox; /** * @var yii\web\View $this */ $this->title = Module::t('admin', 'admin'); $this->params['breadcrumbs'][] = $this->title; ?> <!-- Small boxes (Stat box) --> <div class="row"> <?php echo SmallBox::widget(['data' => ['count' => 57, 'text' => 'asdasd']]); echo SmallBox::widget(['color' => 'bg-green', 'count' => 53, 'count_type' => '%', 'text' => 'Bounce Rate', 'icon' => 'ion-stats-bars', 'link' => ['/settings']]); ?> <div class="col-lg-3 col-xs-6"> <!-- small box --> <div class="small-box bg-yellow"> <div class="inner"> <h3> 44 </h3>
/** * @inheritdoc */ public function attributeLabels() { return ['id' => Module::t('admin', 'ID'), 'section' => Module::t('admin', 'Section'), 'key' => Module::t('admin', 'Key'), 'type' => Module::t('admin', 'Type'), 'title' => Module::t('admin', 'Title'), 'more' => Module::t('admin', 'More')]; }
<?php use yii\helpers\Html; use simplator\admin\Module; /* @var $this yii\web\View */ /* @var $model simplator\admin\models\Name */ $this->title = Module::t('admin', 'Create Name'); $this->params['breadcrumbs'][] = ['label' => Module::t('admin', 'Names'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="name-create"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php echo $this->render('_form', ['model' => $model]); ?> </div>
<?php echo $form->field($model, 'section'); ?> <?php echo $form->field($model, 'key'); ?> <?php echo $form->field($model, 'value'); ?> <?php echo $form->field($model, 'active')->checkbox(); ?> <div class="form-group"> <?php echo Html::submitButton(Module::t('admin', 'Search'), ['class' => 'btn btn-primary']); ?> <?php echo Html::resetButton(Module::t('admin', 'Reset'), ['class' => 'btn btn-default']); ?> </div> <?php ActiveForm::end(); ?> </div>
echo $form->field($model, 'section')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'key')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'type')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'title')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'more')->textInput(['maxlength' => true]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? Module::t('admin', 'Create') : Module::t('admin', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>