Exemplo n.º 1
0
?>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12"> 
             <?php 
echo ListView::widget(['summary' => false, 'itemView' => '_topic', 'id' => 'yboardTopic', 'dataProvider' => $dataProvider]);
?>
        </div>
       
    </div>
    
    <div>
        <?php 
echo $this->render('_forumfooter');
?>
    </div>
</div>

<div style="display:none;">
<?php 
if (Yii::$app->user->can('moderator')) {
    Dialog::begin(['id' => 'dlgTopicForm', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Update topic'), 'autoOpen' => false, 'modal' => true, 'height' => 400, 'width' => 300, 'buttons' => [['text' => YBoard::t('yboard', 'Change'), 'class' => 'btn btn-sm btn-success', 'click' => new JsExpression(' function() { YBoard.changeTopic("' . \Yii::$app->urlmanager->createAbsoluteUrl($this->context->module->id . '/moderator/change-topic') . '"); }')], ['text' => YBoard::t('yboard', 'Cancel'), 'class' => 'btn btn-sm btn-danger', 'click' => new JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
    echo $this->render('_topicForm', array('model' => new YBoardTopic()));
    Dialog::end();
}
?>
</div>
Exemplo n.º 2
0
 /**
  * @param $view
  */
 public function register($view)
 {
     $view->on($view::EVENT_END_BODY, function ($event) {
         $this->registerAssets($event->sender);
         if ($this->htmlScope) {
             echo Html::beginTag('span', ['class' => $this->htmlScopeClass]);
         }
         if ($this->dialog == I18N::DIALOG_BS) {
             \yii\bootstrap\Modal::begin(['header' => '<div id="dots-modal-header"><div id="dots-modal-cat-header"></div><div id="dots-modal-key-header"></div></div>', 'closeButton' => ['class' => 'close dot-close'], 'options' => ['id' => 'dots-btn-modal'], 'toggleButton' => ['id' => 'dots-btns', 'style' => 'display: none;']]);
             $this->bodyDialog();
             \yii\bootstrap\Modal::end();
         } else {
             if ($this->dialog == I18N::DIALOG_JQ) {
                 \yii\jui\Dialog::begin(['options' => ['id' => 'dots-btn-modal', 'style' => 'display: none;'], 'clientOptions' => ['autoOpen' => false, 'width' => '50%']]);
                 $this->bodyDialog();
                 \yii\jui\Dialog::end();
             } else {
                 if ($this->dialog == I18N::DIALOG_MAGNIFIC) {
                     \pavlinter\translation\widgets\MagnificPopup::begin(['toggleButton' => ['id' => 'dots-btns', 'style' => 'display: none;', 'href' => '#dots-btn-modal'], 'popupClass' => 'dot-white-popup', 'effect' => 'zoom-in', 'popupOptions' => ['class' => 'dots-modal-magnific', 'id' => 'dots-btn-modal']]);
                     echo Html::beginTag('div', ['id' => 'dots-modal-header']);
                     echo Html::tag('div', null, ['id' => 'dots-modal-cat-header']);
                     echo Html::tag('div', null, ['id' => 'dots-modal-key-header']);
                     echo Html::endTag('div');
                     $this->bodyDialog();
                     \pavlinter\translation\widgets\MagnificPopup::end();
                 }
             }
         }
         if ($this->htmlScope) {
             echo Html::endTag('span');
         }
     });
     $this->showDot = true;
 }
Exemplo n.º 3
0
echo $form->field($extmatch, 'int_total');
//echo $form->error($extmatch, 'int_total');
?>
    </div>  
</div>
<div class="form-actions">
    <?php 
echo \yii\helpers\Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-primery']);
?>
    
</div>

<?php 
kartik\form\ActiveForm::end();
app\widgets\MiniForm::end();
\yii\jui\Dialog::begin(array('id' => "transactionDiag", 'clientOptions' => array('title' => Yii::t('app', 'Choose Reference Document'), 'autoOpen' => false, 'width' => 600)));
echo $this->render('//transaction/create', array('model' => new app\models\FormTransaction()));
\yii\jui\Dialog::end();
$java = <<<JS
\$("#formextmatch-account_id").change(function() {
            var value = \$("#formextmatch-account_id").val();
            \$.post(baseAddress+"/bankbook/extmatchajax", {FormExtmatch: {account_id: value}}).done(
                    function(data) {
                        \$("#result").html(data);
                    }
            );

        });
        
JS;
$this->registerJs("var baseAddress='" . yii\helpers\BaseUrl::base() . "';" . $java, \yii\web\View::POS_READY);
Exemplo n.º 4
0
    <label for="copy-urn-field">URN:</label>
    <br/>
    <input readonly="true" type="text" name="copy-urn-field" id="copy-urn-field" size="50" style="margin-top: 10px;" value="urn"/>
</div>

<div id="cancel-dialog" title="<?php 
echo Yii::t("circuits", "Cancel");
?>
" hidden>
    <br>
    <label><?php 
echo Yii::t("circuits", "Do you want to cancel this connection?");
?>
</label>
    <br/>
</div>

<div style="display: none">
<?php 
Dialog::begin(['id' => 'dialog', 'clientOptions' => ['modal' => true, 'autoOpen' => false, 'title' => "Reservation"]]);
echo '<br></br>';
echo '<p style="text-align: left; height: 100%; width:100%;" id="message"></p>';
Dialog::end();
?>
</div>

<div id="tooltip" class="triangle" hidden></div>



Exemplo n.º 5
0
    $("#imgInp").change(function(){  readURL(this);  });
    
    //Changing image
    $("#updateAvatar").click(function(){ 
        //hide preview for Images           
        $("#preview").hide();
        $("#imgInp").val(""); 
        
        //load images
        loadImages();
        $( "#avatars-dialog" ).dialog({ width: 800 });
        $("#avatars-dialog").dialog("open"); 
    });
    
');
Dialog::begin(['id' => 'avatars-dialog', 'clientOptions' => ['modal' => true, 'title' => Yii::t('app', 'Click any image to change Avatar'), 'autoOpen' => false, 'maxHeight' => 400, 'dialogClass' => 'no-close', 'buttons' => [['text' => Yii::t('app', 'Close'), 'class' => 'btn btn-sm btn-success', 'click' => new JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
echo '<div id="contents"></div>';
echo '    <p><img id="preview" src="#" alt="Image Preview" style="height:100px; border:solid grey 1px; padding:3px;" /></p>';
echo '<form>
            <input id="imgInp" type="file" name="file" />
            <p style="padding:5px;" ><button id="upload" class="btn btn-xs btn-default">Upload</button></p>
        </form>';
Dialog::end();
?>
<div class="profile-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    
Exemplo n.º 6
0
echo Html::encode($this->title);
?>
</p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'user_id', 'value' => function ($model, $index, $dataColumn) {
    return $model->member->profile->username;
}], ['attribute' => 'banned_by', 'value' => function ($model, $index, $dataColumn) {
    return $model->banner->profile->username;
}], ['attribute' => 'expires', 'format' => 'raw', 'value' => function ($model, $index, $dataColumn) {
    return Editable::widget(['value' => DateTimeCalculation::short($model->expires), 'name' => 'expires', 'options' => ['name' => 'expires'], 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_DATETIME, 'formOptions' => ['action' => url::to(['moderator/change-ban-period', 'id' => $model->id])]]);
}], 'ip', 'email:email', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{lift} {reason}', 'buttons' => ['lift' => function ($url, $model, $key) {
    return Html::a('<span class="glyphicon glyphicon-tint"></span>', '#', ['title' => YBoard::t('yboard', 'Lift Ban'), 'onclick' => 'if(confirm("' . YBoard::t('yboard', 'Do you really Lift this Ban') . '")) { banLift("' . Yii::$app->urlManager->createAbsoluteUrl([$this->context->module->id . '/moderator/ban-lift', 'id' => $model->id]) . '"); }return false; ']);
}, 'reason' => function ($url, $model, $key) {
    return Html::a('<span class="glyphicon glyphicon-envelope"></span>', '#', ['title' => YBoard::t('yboard', 'Ban Reason'), 'onclick' => 'banMessage(\'' . $model->message . '\')']);
}]]]]);
?>

</div>

<?php 
Dialog::begin(['id' => 'dlgBanMsg', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Ban Reason'), 'autoOpen' => false, 'modal' => true, 'height' => 'auto', 'min-height' => 100, 'width' => 200, 'buttons' => [['text' => YBoard::t('yboard', 'close'), 'class' => 'btn btn-sm btn-danger', 'click' => new \yii\web\JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
?>
    
    <div id="dlgBanMsgText" class="alert alert-warning panel"></div>
    
<?php 
Dialog::end();
?>
 
Exemplo n.º 7
0
<?php 
$this->widget('bootstrap.widgets.TbButton', array('label' => Yii::t('app', 'Add new'), 'type' => 'success', 'options' => array('onclick' => '$("#addnew").dialog("open"); return false;')));
?>


<?php 
//print_r($model->items);
//Yii::$app->end();
echo app\widgets\GridView::widget(array('id' => 'acc-templateItem-grid', 'dataProvider' => $items->search(), 'filter' => $items, 'columns' => array(array('name' => 'eavFields_id', 'value' => '$data->EavFields->name'), array('class' => 'yii\\grid\\ActionColumn', 'template' => '{remove}', 'buttons' => array('remove' => array('label' => '<i class="glyphicon glyphicon-remove"></i>', 'url' => '$data->id', 'options' => array('onclick' => 'deleteTempItm(this);return false;')))))));
app\widgets\MiniForm::end();
?>


<?php 
echo \yii\jui\Dialog::begin(array('id' => 'addnew', 'options' => array('title' => Yii::t('app', 'Add new field'), 'autoOpen' => false, 'width' => '600px')));
//bootstrap.widgets.TbModal
$form = kartik\form\ActiveForm::begin(array('id' => 'newField', 'options' => array('class' => 'well'), 'action' => array('SaveSub', 'id' => $model->id)));
?>

<div class="modal-body">
<?php 
$models = EavFields::find()->All(array('order' => 'name'));
$list = \yii\helpers\ArrayHelper::map($models, 'id', 'name');
$options = array();
$select = \yii\helpers\Html::dropDownList(ucfirst($this->id) . 'Item[eavFields_id]', 0, $list, $options);
echo $select;
?>
    <input type='hidden' value='<?php 
echo $model->id;
?>
Exemplo n.º 8
0
    Dialog::begin(['id' => 'dlgReportForm', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Report post'), 'autoOpen' => false, 'modal' => true, 'height' => 'auto', 'width' => 'auto', 'buttons' => [['text' => YBoard::t('yboard', 'Send'), 'class' => 'btn btn-sm btn-success', 'click' => new \yii\web\JsExpression('function(){ 
                        for(instance in CKEDITOR.instances)
                        {
                            CKEDITOR.instances[instance].updateElement();
                        }
                        sendReport(); 
                    }')], ['text' => YBoard::t('yboard', 'Cancel'), 'class' => 'btn btn-sm btn-danger', 'click' => new \yii\web\JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
    echo $this->render('_reportForm', ['model' => new YBoardMessage()]);
    Dialog::end();
    Dialog::begin(['id' => 'dlgPrivateMsg', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Send Private Message'), 'autoOpen' => false, 'modal' => true, 'height' => 'auto', 'width' => 'auto', 'buttons' => [['text' => YBoard::t('yboard', 'Send'), 'class' => 'btn btn-sm btn-success', 'click' => new \yii\web\JsExpression('function(){ 
                        for(instance in CKEDITOR.instances)
                        {
                            CKEDITOR.instances[instance].updateElement();
                        }
                        sendPMForm(); 
                    }')], ['text' => YBoard::t('yboard', 'Cancel'), 'class' => 'btn btn-sm btn-danger', 'click' => new \yii\web\JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
    echo $this->render('_PrivateMsgForm', ['model' => new YBoardMessage(['sendfrom' => Yii::$app->user->identity->id, 'sendto' => 0])]);
    Dialog::end();
}
//for viewing who appreciated post
Dialog::begin(['id' => 'dlg-appreciated', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Member Appreciated'), 'autoOpen' => false, 'modal' => true, 'height' => 'auto', 'width' => '300', 'buttons' => [['text' => YBoard::t('yboard', 'close'), 'class' => 'btn btn-sm btn-default', 'click' => new \yii\web\JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
echo '<div id="appreciated-content" ></div>';
Dialog::end();
?>
</div>

<?php 
//for banning Users
Dialog::begin(['id' => 'dlg-ban', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Ban User'), 'autoOpen' => false, 'modal' => true, 'height' => 'auto', 'width' => '300']]);
echo $this->render('_banForm', ['model' => new YBoardMessage(['sendfrom' => Yii::$app->user->id, 'sendto' => 0])]);
Dialog::end();
Exemplo n.º 9
0
                   if(data.success)
                   {
                        $("#form-contents").html(data.msg);
                        $("#form-contents").addClass("alert alert-success");
                   }
                   else
                   {
                        $("#form-error").text(data.msg);
                        $("#form-error").addClass("alert alert-danger");  
                   } 
                });
    });
');
$this->registerCSS('.no-close .ui-dialog-titlebar-close {display: none;}');
//hide dialog Bar
Dialog::begin(['id' => 'reset-pass-dialog', 'clientOptions' => ['modal' => true, 'title' => Yii::t('app', 'Reset Profile Password'), 'autoOpen' => false, 'maxHeight' => 400, 'dialogClass' => 'no-close', 'buttons' => [['text' => Yii::t('app', 'Close'), 'class' => 'btn btn-sm btn-default', 'click' => new JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
?>

    <div id="form-contents">    
        <p id='form-error'><?php 
echo \Yii::t('app', '{h}Enter Valid Email or username you registered with{ch}', ['h' => '<b>', 'ch' => '</b>']);
?>
</p>
       <p> <input type="text" id="email" class="form-control" /></p>
       
        <div id="pbar" class="progress progress-striped active">
          <div class="progress-bar"  role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
          </div>
        </div>

        <p><?php 
 public function actionUpdate($id)
 {
     $model = $this->findModel($id);
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         if (!empty($model->save())) {
             if ($_POST['User']['role'] == 1) {
                 $auth = Yii::$app->get('authManager');
                 $auth->getRolesByUser($model->id);
                 $auth->revokeAll($model->id);
                 $authorRole = $auth->createRole('superadmin');
                 $auth->assign($authorRole, $model->id);
             } else {
                 if ($_POST['User']['role'] == 2) {
                     $auth = Yii::$app->get('authManager');
                     $auth->getRolesByUser($model->id);
                     $auth->revokeAll($model->id);
                     $authorRole = $auth->createRole('admin');
                     $auth->assign($authorRole, $model->id);
                 } else {
                     if ($_POST['User']['role'] == 3) {
                         $auth = Yii::$app->get('authManager');
                         $auth->getRolesByUser($model->id);
                         $auth->revokeAll($model->id);
                         $authorRole = $auth->createRole('Pimpinan 1');
                         $auth->assign($authorRole, $model->id);
                     } else {
                         if ($_POST['User']['role'] == 4) {
                             $auth = Yii::$app->get('authManager');
                             $auth->getRolesByUser($model->id);
                             $auth->revokeAll($model->id);
                             $authorRole = $auth->createRole('Pimpinan 2');
                             $auth->assign($authorRole, $model->id);
                         } else {
                             if ($_POST['User']['role'] == 5) {
                                 $auth = Yii::$app->get('authManager');
                                 $auth->getRolesByUser($model->id);
                                 $auth->revokeAll($model->id);
                                 $authorRole = $auth->createRole('User');
                                 $auth->assign($authorRole, $model->id);
                             }
                         }
                     }
                 }
             }
             Yii::$app->db->createCommand()->update('user', ['role' => $_POST['User']['role']], ['id' => $model->id])->execute();
             $model->save();
             Dialog::begin(['clientOptions' => ['modal' => true]]);
             echo 'Data Sudah Tersimpan';
             Dialog::end();
         }
         //return $this->redirect(['/user/profile']);
     }
     return $this->render('update', ['model' => $model]);
 }
Exemplo n.º 11
0
use yii\web\JsExpression;
use yii\jui\AutoComplete;
use app\modules\yboard\models\YBoardMessage;
use app\components\ckeditor\CKEditor;
use kartik\widgets\Select2;
use yii\helpers\ArrayHelper;
use hosanna\profile\models\User;
use app\modules\yboard\YBoard;
$model = new YBoardMessage(['sendfrom' => Yii::$app->user->identity->id]);
$data = User::find()->select(['username'])->where('id<>' . Yii::$app->user->id)->asArray()->all();
//format them for Input Widget
$data = ArrayHelper::getColumn($data, 'username');
Dialog::begin(['id' => 'dlgPrivateMsg', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Send Private Message'), 'autoOpen' => false, 'height' => '400', 'width' => '400', 'buttons' => [['text' => YBoard::t('yboard', 'Send'), 'class' => 'btn btn-sm btn-success', 'click' => new \yii\web\JsExpression('function(){ 
                    for(instance in CKEDITOR.instances)
                    {
                        CKEDITOR.instances[instance].updateElement();
                    }
                    sendPMForm(); 
                }')], ['text' => YBoard::t('yboard', 'Cancel'), 'class' => 'btn btn-sm btn-danger', 'click' => new \yii\web\JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
?>

    <div class="yboard-message-form">

    <?php 
$form = ActiveForm::begin(['id' => 'pm-form']);
?>
          
    <?php 
echo $form->field($model, 'usernames')->widget(Select2::classname(), ['name' => 'usernames', 'options' => ['placeholder' => 'Select User', 'id' => 'YBoardMessage_pm_usernames'], 'pluginOptions' => ['tags' => $data, 'maximumInputLength' => 10]]);
?>
       
Exemplo n.º 12
0
    <p>
        <?php 
echo Html::a('Create Autores', ['create'], ['class' => 'btn btn-success']);
?>
    </p>
    
    <?php 
Pjax::begin(['id' => 'listado', 'timeout' => 5000, 'enablePushState' => false]);
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => ['id', 'nombre', 'apellidos', ['class' => 'yii\\grid\\DataColumn', 'content' => function ($model, $key, $index, $column) {
    return Html::a('Edit', ['autores/update-form', 'id' => $key], ['data-pjax' => 0, 'class' => 'edit-link']);
}]]]);
Pjax::end();
?>
    
    <?php 
Dialog::begin(['id' => 'popup-edicion', 'clientOptions' => ['modal' => true, 'autoOpen' => false]]);
?>
    
    <?php 
Pjax::begin(['id' => 'edit-container', 'timeout' => 5000, 'enablePushState' => false]);
Pjax::end();
?>
    
    <?php 
Dialog::end();
?>

    <?php 
// Registra el array de variables globales de la página en el <head />.
// Eso garantiza que está disponible para el fichero autores.js, que se carga al final del <body />.
$this->registerJs("var jsGlobals = {$jsGlobals};", View::POS_HEAD);
Exemplo n.º 13
0
use app\modules\yboard\models\YBoardSetting;
$this->params['breadcrumbs'] = [['label' => YBoard::t('yboard', 'Forums'), 'url' => ['forum/index']], YBoard::t('yboard', 'Settings')];
$this->title = YBoard::t('yboard', 'Settings');
$this->params['adminMenu'] = [['label' => YBoard::t('yboard', 'Manage Forum'), 'url' => ['setting/forum']], ['label' => YBoard::t('yboard', 'Member groups'), 'url' => ['setting/group']], ['label' => YBoard::t('yboard', 'Manage Member'), 'url' => ['setting/users']], ['label' => YBoard::t('yboard', 'Permissions'), 'url' => ['/admin']], ['label' => YBoard::t('yboard', 'Webspiders'), 'url' => ['setting/spider']]];
?>
<div id="yboard-wrapper">

    <div class="row">
        <div class="pad5">
            <?php 
echo Html::button(YBoard::t('yboard', 'New') . ' <span class="glyphicon glyphicon-cog"></span>', ['class' => 'btn btn-primary btn-sm', 'onclick' => 'newSetting("' . Yii::$app->urlManager->createAbsoluteUrl(Yii::$app->controller->module->id . '/setting/create') . '");']);
?>
         </div>
    </div>
    
    <div class="row">
        <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'layout' => "\n{items}\n{pager}", 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'key', 'value', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}', 'buttons' => ['update' => function ($url, $model, $key) {
    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, ['title' => Yii::t('yii', 'Update'), 'data-pjax' => '0', 'onclick' => new JsExpression('updateSetting("' . $url . '","' . $model->key . '","' . $model->value . '"); return false;')]);
}]]]]);
?>
	</div> 
</div>

<?php 
\yii\jui\Dialog::begin(['id' => 'dlgNewSetting', 'clientOptions' => ['title' => YBoard::t('yboard', 'New Setting'), 'autoOpen' => false, 'modal' => true, 'width' => 300, 'height' => 300, 'show' => 'fade', 'buttons' => [YBoard::t('yboard', 'Save') => new JsExpression('function(){ saveSetting("' . Yii::$app->urlManager->createAbsoluteUrl(Yii::$app->controller->module->id . '/setting/create') . '"); }'), YBoard::t('yboard', 'Cancel') => new JsExpression('function(){ $(this).dialog("close"); }')]]]);
echo $this->render('_settings', ['model' => new YBoardSetting()]);
\yii\jui\Dialog::end();
?>

Exemplo n.º 14
-1
$this->params['breadcrumbs'] = [['label' => YBoard::t('yboard', 'Forums'), 'url' => ['forum/index']], ['label' => YBoard::t('yboard', 'settings'), 'url' => ['index']], YBoard::t('yboard', 'Member groups')];
$this->params['adminMenu'] = [['label' => YBoard::t('yboard', 'Settings'), 'url' => ['setting/index']], ['label' => YBoard::t('yboard', 'Manage forums'), 'url' => ['setting/forum']], ['label' => YBoard::t('yboard', 'Ranks'), 'url' => ['setting/rank']], ['label' => YBoard::t('yboard', 'Moderators'), 'url' => ['setting/moderator']], ['label' => YBoard::t('yboard', 'Webspiders'), 'url' => ['setting/spider']]];
$this->registerJs("\nvar confirmation = '" . YBoard::t('yboard', 'Are you sure that you want to delete this member group?') . "'\n", \yii\web\View::POS_BEGIN, 'confirmation');
?>

<div id="yboard-wrapper">
	<div class="pad5-bottom">
        <?php 
echo Html::button(YBoard::t('yboard', 'New Group') . ' <span class="glyphicon glyphicon-user"></span>', ['onclick' => 'editMembergroup()', 'class' => 'btn btn-primary btn-sm']);
?>
    </div>
	
	<?php 
echo \yii\grid\GridView::widget(['id' => 'membergroup-grid', 'layout' => '{items} {summary} {pager}', 'dataProvider' => $model->search(), 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'name', 'description', ['attribute' => 'color', 'format' => 'html', 'value' => function ($data) {
    return Html::tag('p', $data->color);
}, 'contentOptions' => function ($model, $key, $index, $column) {
    return ['style' => "font-weight:bold;color:" . $model->color . ";"];
}], ['attribute' => 'image', 'format' => 'html', 'value' => function ($data) {
    return Html::img($this->context->module->getRegisteredImage('groups/' . $data->image), ['alt' => $data->image]);
}, 'contentOptions' => function ($model, $key, $index, $column) {
    return ['style' => "color:" . $model->color . ";"];
}], 'group_role', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}', 'buttons' => ['update' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', '#', ['title' => Yii::t('yii', 'Update'), 'data-pjax' => '0', 'onclick' => 'editMembergroup(' . $model->id . ', "' . Yii::$app->urlManager->createAbsoluteUrl($this->context->module->id . '/setting/get-membergroup') . '"); return false;']);
}]]]]);
?>
</div>

<?php 
\yii\jui\Dialog::begin(['id' => 'dlgEditMembergroup', 'clientOptions' => ['title' => 'Member Group', 'autoOpen' => false, 'modal' => true, 'width' => 400, 'show' => 'fade', 'buttons' => [YBoard::t('yboard', 'Delete') => new JsExpression('function(){ deleteMembergroup("' . Yii::$app->urlManager->createAbsoluteUrl(Yii::$app->controller->module->id . '/setting/delete-membergroup') . '"); }'), YBoard::t('yboard', 'Save') => new JsExpression('function(){ saveMembergroup("' . Yii::$app->urlManager->createAbsoluteUrl(Yii::$app->controller->module->id . '/setting/save-membergroup') . '"); }'), YBoard::t('yboard', 'Cancel') => new JsExpression('function(){ $(this).dialog("close"); }')]]]);
echo $this->render('_editMembergroup', ['model' => $model]);
\yii\jui\Dialog::end();