/** * Renders the widget. */ public function run() { Portlet::begin(['title' => $this->title, 'subtitle' => $this->subtitle, 'buttons' => [Search::widget(['searchModel' => $this->searchModel])]]); echo GridView::widget(['id' => 'gridview-auth0-user-list', 'dataProvider' => $this->dataProvider, 'columns' => $this->columns, 'options' => ['class' => 'table-scrollable table-scrollable-borderless'], 'tableOptions' => ['class' => 'table table-hover table-light'], 'headerRowOptions' => ['class' => 'uppercase'], 'summary' => '']); Portlet::end(); }
<div class="change-tenant-form"> <?php ModalForm::begin(); ?> <?php $form = ActiveForm::begin(['id' => $model->formName(), 'enableClientValidation' => true]); ?> <?php Portlet::begin(['title' => $this->title, 'buttons' => [Html::submitButton('<i class="fa fa-check"></i> <u>U</u>pdate', ['class' => 'btn green-haze btn-circle', 'value' => "form#{$model->formName()}", 'accesskey' => 'u'])]]); ?> <div class="row"> <div class="col-md-12"> <?php echo $form->field($model, 'tenant_id', [])->widget(Select2::classname(), ['data' => $tenantSelectProvider, 'options' => ['placeholder' => 'Select a tenant ...'], 'pluginOptions' => ['allowClear' => true]]); ?> <?php Portlet::end(); ?> <?php ActiveForm::end(); ?> <?php ModalForm::end(); ?> </div>
/** * Renders the widget. */ public function run() { Portlet::begin(['title' => $this->title, 'subtitle' => $this->subtitle, 'buttons' => [Search::widget(['searchModel' => $this->searchModel]), ModalButton::widget(['buttonLabel' => Html::tag('i', '', ['class' => 'fa fa-plus']), 'url' => Url::to(['tenant/ajax-create', 'pjaxId' => 'list-pjax']), 'tooltipTitle' => 'New Tenant', 'name' => 'new-tenant-button'])]]); echo GridView::widget(['id' => 'gridview-tenant', 'dataProvider' => $this->dataProvider, 'columns' => Tenant::column()->raw(['name'])->actions('{view} {ajax-update} {ajax-delete}')->all(), 'options' => ['class' => 'table-scrollable table-scrollable-borderless'], 'tableOptions' => ['class' => 'table table-hover table-light'], 'headerRowOptions' => ['class' => 'uppercase'], 'summary' => '']); Portlet::end(); }