public function init()
 {
     $this->headerOptions = ['class' => 'text-center', 'style' => 'width: 115px'];
     $this->contentOptions = ['class' => 'text-center'];
     parent::init();
     $this->content = function (ModelBase $model, $key, $index, DataColumn $column) {
         return ControllerBase::getYesNoLabel($model->{$column->attribute});
     };
 }
 public function init()
 {
     $this->model = $this->getModel();
     $this->modelSearch = $this->getModelSearch();
     $this->indexActionDescription = Yii::t('common', 'Index Action Description');
     $this->viewActionDescription = Yii::t('common', 'View Action Description');
     $this->createActionDescription = Yii::t('common', 'Create Action Description');
     $this->updateActionDescription = Yii::t('common', 'Update Action Description');
     parent::init();
 }
Exemplo n.º 3
0
<?php

/* @var $this yii\web\View */
/* @var $model \dersonsena\userModule\models\User */
use dersonsena\commonClasses\controller\ControllerBase;
use yii\widgets\DetailView;
$this->params['breadcrumbs'][] = ['label' => $this->context->controllerDescription, 'url' => [$this->context->id . '/index']];
$this->params['breadcrumbs'][] = $this->context->actionDescription;
?>

<div class="box form-actions">
    <div class="box-body">
        <?php 
echo $this->render('@common-classes/views/crud/view-default-buttons');
?>
    </div>
</div>

<div class="box box-primary">

    <div class="box-body">

        <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'name', 'email:email', 'group.name:text:' . $model->getAttributeLabel('group_id'), ['attribute' => 'status', 'format' => 'raw', 'value' => ControllerBase::getYesNoLabel($model->status)], 'created_at', 'updated_at', 'createdBy.name:text:' . $model->getAttributeLabel('created_by')]]);
?>

    </div>

</div>
 public function init()
 {
     parent::init();
     $this->controllerDescription = Yii::t('user', 'Authentication');
 }
Exemplo n.º 5
0
/* @var $this yii\web\View */
/* @var $searchModel \dersonsena\userModule\models\search\GroupSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
use dersonsena\commonClasses\controller\ControllerBase;
use yii\grid\GridView;
use yii\widgets\Pjax;
$this->params['breadcrumbs'][] = $this->context->controllerDescription;
?>
<div class="box box-primary">

    <div class="box-body">

        <section class="well well-sm">
            <?php 
echo $this->render('@common-classes/views/crud/index-default-actions');
?>
        </section>

        <?php 
Pjax::begin();
?>
        <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'id', 'headerOptions' => ['class' => 'text-right', 'style' => 'width: 50px'], 'contentOptions' => ['class' => 'text-right']], ['attribute' => 'name', 'class' => 'dersonsena\\commonClasses\\components\\grid\\LinkDataColumn'], ['attribute' => 'status', 'class' => 'dersonsena\\commonClasses\\components\\grid\\YesNoDataColumn', 'filter' => ControllerBase::getStatus()], ['class' => 'dersonsena\\commonClasses\\components\\grid\\ActionGridColumn']]]);
?>
        <?php 
Pjax::end();
?>

    </div>

</div>
Exemplo n.º 6
0
/* @var $searchModel \dersonsena\userModule\models\search\UserSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
use dersonsena\commonClasses\controller\ControllerBase;
use dersonsena\userModule\models\Group;
use yii\grid\GridView;
use yii\widgets\Pjax;
$this->params['breadcrumbs'][] = $this->context->controllerDescription;
?>
<div class="box box-primary">

    <div class="box-body">

        <section class="well well-sm">
            <?php 
echo $this->render('@common-classes/views/crud/index-default-actions');
?>
        </section>
        
        <?php 
Pjax::begin();
?>
        <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'id', 'headerOptions' => ['class' => 'text-right', 'style' => 'width: 50px'], 'contentOptions' => ['class' => 'text-right']], ['attribute' => 'name', 'class' => 'dersonsena\\commonClasses\\components\\grid\\LinkDataColumn'], ['attribute' => 'email', 'format' => 'email', 'headerOptions' => ['style' => 'width: 250px']], ['attribute' => 'group_id', 'filter' => (new Group())->getDropdownOptions('name'), 'headerOptions' => ['style' => 'width: 150px', 'class' => 'text-center'], 'contentOptions' => ['class' => 'text-center'], 'value' => 'group.name'], ['attribute' => 'status', 'class' => 'dersonsena\\commonClasses\\components\\grid\\YesNoDataColumn', 'filter' => ControllerBase::getStatus()], ['class' => 'dersonsena\\commonClasses\\components\\grid\\ActionGridColumn']]]);
?>
        <?php 
Pjax::end();
?>

    </div>

</div>