/**
  * @inheritdoc
  */
 protected function renderDataCellContent($model, $key, $index)
 {
     if ($this->checkboxOptions instanceof Closure) {
         $options = call_user_func($this->checkboxOptions, $model, $key, $index, $this);
     } else {
         $options = $this->checkboxOptions;
         if (!isset($options['value'])) {
             $options['value'] = is_array($key) ? json_encode($key, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) : $key;
         }
     }
     return Html::checkbox($this->name, !empty($options['checked']), $options);
 }
Exemple #2
0
                <div class="col-sm-6 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'post-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'post-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'post-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'post-grid', 'actions' => [Url::to(['bulk-activate']) => Yii::t('yee', 'Publish'), Url::to(['bulk-deactivate']) => Yii::t('yee', 'Unpublish'), Url::to(['bulk-delete']) => Yii::t('yii', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/post/default', 'title' => function (Post $model) {
    return Html::a($model->title, ['/post/default/view', 'id' => $model->id], ['data-pjax' => 0]);
}], ['attribute' => 'created_by', 'filter' => yeesoft\models\User::getUsersList(), 'value' => function (Post $model) {
    return Html::a($model->author->username, ['/user/default/update', 'id' => $model->created_by], ['data-pjax' => 0]);
}, 'format' => 'raw', 'visible' => User::hasPermission('viewUsers'), 'options' => ['style' => 'width:180px']], ['class' => 'yeesoft\\grid\\columns\\StatusColumn', 'attribute' => 'status', 'optionsArray' => Post::getStatusOptionsList(), 'options' => ['style' => 'width:60px']], ['class' => 'yeesoft\\grid\\columns\\DateFilterColumn', 'attribute' => 'published_at', 'value' => function (Post $model) {
    return '<span style="font-size:85%;" class="label label-' . (time() >= $model->published_at ? 'primary' : 'default') . '">' . $model->publishedDate . '</span>';
}, 'format' => 'raw', 'options' => ['style' => 'width:150px']]]]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>


Exemple #3
0
            <?php 
    echo FA::icon($model->image)->size(FA::SIZE_LARGE)->fixedWidth();
    ?>
        </div>
    <?php 
}
?>
    <div class="pull-left">
        <b><?php 
echo $model->label;
?>
</b><br/>
        <span class="menu-link"><?php 
echo empty($model->link) ? "(no link)" : "[{$model->link}]";
?>
</span>
    </div>
    <div class="menu-link-actions">
        <?php 
echo Html::a('[' . Yii::t('yee', 'Edit') . ']', ['/menu/link/update', 'id' => $model->id], ['data-pjax' => 0]);
?>
        <br/>
            <?php 
echo Html::a('[' . Yii::t('yee', 'Delete') . ']', ['/menu/link/delete', 'id' => $model->id], ['data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0']);
?>
    </div>
    
</div>
<span class="sortable-drag-icon glyphicon glyphicon-move"></span>
<?php 
echo $this->render('links', ['searchLinkModel' => $searchLinkModel, 'searchParams' => ['parent_id' => $model->id], 'parentId' => $model->id]);
Exemple #4
0
            <div class="row">
                <div class="col-sm-12 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'permission-groups-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'permission-groups-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'permission-groups-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'permission-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yee', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['attribute' => 'name', 'class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/user/permission-groups', 'title' => function ($model) {
    if (User::hasPermission('manageRolesAndPermissions')) {
        return Html::a($model->name, ['update', 'id' => $model->code], ['data-pjax' => 0]);
    } else {
        return $model->name;
    }
}, 'buttonsTemplate' => '{update} {delete}'], 'code']]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>


Exemple #5
0
    <div class="panel panel-default">
        <div class="panel-body">

            <div class="row">
                <div class="col-sm-12 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'page-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'seo-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'seo-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'seo-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yii', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['attribute' => 'url', 'class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/seo/default', 'title' => function (Seo $model) {
    return Html::a($model->url, ['/seo/default/update', 'id' => $model->id], ['data-pjax' => 0]);
}, 'buttonsTemplate' => '{update} {delete}'], 'title', ['class' => 'yeesoft\\grid\\columns\\StatusColumn', 'attribute' => 'index', 'options' => ['style' => 'width:30px']], ['class' => 'yeesoft\\grid\\columns\\StatusColumn', 'attribute' => 'follow', 'options' => ['style' => 'width:30px']]]]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>


        }
        ?>

                                <?php 
        echo $form->field($message, "[{$index}]translation")->label($message->source->message . $links);
        ?>

                            <?php 
    }
    ?>

                            <?php 
    if (User::hasPermission('updateSourceMessages')) {
        ?>
                                <?php 
        echo Html::submitButton(Yii::t('yee', 'Save All'), ['class' => 'btn btn-primary']);
        ?>
                            <?php 
    }
    ?>

                            <?php 
    ActiveForm::end();
    ?>

                        <?php 
}
?>

                    </div>
                </div>
Exemple #7
0
<?php 
echo Html::hiddenInput('id', $model->id);
?>

<?php 
if (User::hasPermission('editMedia') && $mode != 'modal') {
    ?>
    <?php 
    echo Html::submitButton(Yii::t('yee', 'Save'), ['class' => 'btn btn-primary']);
}
?>

<?php 
if ($mode == 'modal') {
    ?>
    <?php 
    echo Html::button(Yii::t('yee', 'Insert'), ['id' => 'insert-btn', 'class' => 'btn btn-primary']);
}
?>

<?php 
if ($mode !== 'modal') {
    ?>
    <?php 
    echo Html::a(Yii::t('yee', 'Delete'), ['/media/manage/delete', 'id' => $model->id], ['class' => 'btn btn-default', 'data-message' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-id' => $model->id, 'role' => 'delete']);
}
?>

<?php 
ActiveForm::end();
Exemple #8
0
            <div class="row">
                <div class="col-sm-12 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'menu-link-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'menu-link-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'menu-link-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'menu-link-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yee', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['attribute' => 'image', 'value' => function (MenuLink $model) {
    return FA::icon($model->image)->fixedWidth();
}, 'format' => 'raw', 'contentOptions' => ['style' => 'width:20px; text-align:center;']], ['class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/menu/link', 'attribute' => 'id', 'title' => function (MenuLink $model) {
    return Html::a($model->label, ['/menu/link/update', 'id' => $model->id], ['data-pjax' => 0]);
}, 'format' => 'raw', 'buttonsTemplate' => '{update} {delete}', 'options' => ['style' => 'width:220px']], ['attribute' => 'menu_id', 'filter' => ArrayHelper::merge(['' => Yii::t('yee', 'Not Selected')], Menu::getMenus()), 'value' => function (MenuLink $model) {
    return $model->menu instanceof Menu ? $model->menu->title : Yii::t('yii', '(not set)');
}, 'format' => 'raw'], 'link', 'parent_id', 'order']]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>


Exemple #9
0
       'searchModel' => $searchModel,
   ])*/
?>
                </div>

                <div class="col-sm-6 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'eav-entity-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'eav-entity-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'eav-entity-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'eav-entity-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yee', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['attribute' => 'id', 'options' => ['style' => 'width:20px']], ['class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'attribute' => 'entity_name', 'controller' => '/eav/entity-model', 'buttonsTemplate' => '{update} {delete}', 'title' => function (EavEntityModel $model) {
    return Html::a($model->entity_name, ['update', 'id' => $model->id], ['data-pjax' => 0]);
}], 'entity_model']]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>


Exemple #10
0
            <?php 
echo Alert::widget(['options' => ['class' => 'alert-info menu-link-alert'], 'body' => Yii::t('yee/menu', 'The changes have been saved.')]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-4">
            <div class="panel panel-default">
                <div class="panel-body">
                    <?php 
echo GridView::widget(['id' => 'menu-grid', 'dataProvider' => $dataProvider, 'layout' => '{items}', 'columns' => [['class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/menu/default', 'buttonsTemplate' => '{update} {delete}', 'title' => function (Menu $model) {
    if (User::hasPermission('viewMenuLinks')) {
        return Html::a($model->title, ['/menu/default/index', 'SearchMenuLink[menu_id]' => $model->id], ['data-pjax' => 0]);
    } else {
        return Html::a($model->title, ['/menu/default/view', 'id' => $model->id], ['data-pjax' => 0]);
    }
}]]]);
?>
                </div>
            </div>
        </div>

        <div class="col-sm-8">
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="sortable-container menu-itemes">
                        <?php 
echo $this->render('links', ['searchLinkModel' => $searchLinkModel, 'searchParams' => ['parent_id' => '']]);
?>
                    </div>
Exemple #11
0
                            </div>

                        <?php 
    }
    ?>
                    </div>

                    <div class="dw-quick-links">
                        <?php 
    $list = [];
    ?>
                        <?php 
    foreach ($posts as $post) {
        ?>
                            <?php 
        $list[] = Html::a("<b>{$post['count']}</b> {$post['label']}", $post['url']);
        ?>
                        <?php 
    }
    ?>
                        <?php 
    echo implode(' | ', $list);
    ?>
                    </div>

                <?php 
} else {
    ?>
                    <h4><em><?php 
    echo Yii::t('yee/post', 'No posts found.');
    ?>
Exemple #12
0
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'user-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'user-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'user-grid'], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['attribute' => 'username', 'controller' => '/user/default', 'class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'title' => function (User $model) {
    if (User::hasPermission('editUsers')) {
        return Html::a($model->username, ['/user/default/update', 'id' => $model->id], ['data-pjax' => 0]);
    } else {
        return $model->username;
    }
}, 'buttonsTemplate' => '{update} {delete} {permissions} {password}', 'buttons' => ['permissions' => function ($url, $model, $key) {
    return Html::a(Yii::t('yee/user', 'Permissions'), Url::to(['user-permission/set', 'id' => $model->id]), ['title' => Yii::t('yee/user', 'Permissions'), 'data-pjax' => '0']);
}, 'password' => function ($url, $model, $key) {
    return Html::a(Yii::t('yee/user', 'Password'), Url::to(['default/change-password', 'id' => $model->id]), ['title' => Yii::t('yee/user', 'Password'), 'data-pjax' => '0']);
}], 'options' => ['style' => 'width:300px']], ['attribute' => 'email', 'format' => 'raw', 'visible' => User::hasPermission('viewUserEmail')], ['attribute' => 'gridRoleSearch', 'filter' => ArrayHelper::map(Role::getAvailableRoles(Yii::$app->user->isSuperAdmin), 'name', 'description'), 'value' => function (User $model) {
    return implode(', ', ArrayHelper::map($model->roles, 'name', 'description'));
}, 'format' => 'raw', 'visible' => User::hasPermission('viewUserRoles')], ['class' => 'yeesoft\\grid\\columns\\StatusColumn', 'attribute' => 'superadmin', 'visible' => Yii::$app->user->isSuperadmin, 'options' => ['style' => 'width:60px']], ['class' => 'yeesoft\\grid\\columns\\StatusColumn', 'attribute' => 'status', 'optionsArray' => [[User::STATUS_ACTIVE, Yii::t('yee', 'Active'), 'primary'], [User::STATUS_INACTIVE, Yii::t('yee', 'Inactive'), 'info'], [User::STATUS_BANNED, Yii::t('yee', 'Banned'), 'default']], 'options' => ['style' => 'width:60px']]]]);
?>

            <?php 
Pjax::end();
?>

        </div>
    </div>
</div>
Exemple #13
0
?>

            <?php 
echo Alert::widget(['options' => ['class' => 'alert-info eav-link-alert'], 'body' => Yii::t('yee', 'The changes have been saved.')]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="pull-left" style="margin-right: 10px;">
                        <label class="control-label" for="entityModel">Model: </label>
                        <?php 
echo Html::dropDownList('entityModel', null, $entityModels, ['id' => 'entityModel', 'class' => 'form-control']);
?>
                    </div>
                    <div class="pull-left" style="display: none;">
                        <label class="control-label pull-left" for="entityCategory">
                            <?php 
echo Yii::t('yee', 'Category');
?>
:
                        </label>
                        <div class="eav-categories-wrapper">
                        </div>
                    </div>
                </div>
            </div>
        </div>
 /**
  * Renders the filter cell content.
  * The default implementation simply renders a space.
  * This method may be overridden to customize the rendering of the filter cell (if any).
  * @return string the rendering result
  */
 protected function renderFilterCellContent()
 {
     if (is_string($this->filter)) {
         return $this->filter;
     }
     $model = $this->grid->filterModel;
     if ($this->filter !== false && $model instanceof Model && $this->attribute !== null && $model->isAttributeActive($this->attribute)) {
         if ($model->hasErrors($this->attribute)) {
             Html::addCssClass($this->filterOptions, 'has-error');
             $error = ' ' . Html::error($model, $this->attribute, $this->grid->filterErrorOptions);
         } else {
             $error = '';
         }
         return Html::activeTextInput($model, $this->attribute, $this->filterInputOptions) . $error;
     } else {
         return parent::renderFilterCellContent();
     }
 }
Exemple #15
0
                    </div>

                    <hr/>

                    <?php 
if (User::hasPermission('manageRolesAndPermissions')) {
    ?>
                        <?php 
    echo Html::submitButton(Yii::t('yee', 'Save'), ['class' => 'btn btn-primary btn-sm']);
    ?>
                    <?php 
}
?>

                    <?php 
echo Html::endForm();
?>

                </div>
            </div>
        </div>
    </div>

<?php 
$this->registerJs(<<<JS

\$('.role-help-btn').off('mouseover mouseleave')
\t.on('mouseover', function(){
\t\tvar _t = \$(this);
\t\t_t.popover('show');
\t}).on('mouseleave', function(){
Exemple #16
0
    <div class="panel panel-default">
        <div class="panel-body">

            <div class="row">
                <div class="col-sm-12 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'page-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'link-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'link-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'link-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yii', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['attribute' => 'slug', 'class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/link/default', 'title' => function (Link $model) {
    return Html::a($model->slug, ['/link/default/update', 'id' => $model->id], ['data-pjax' => 0]);
}, 'buttonsTemplate' => '{update} {delete}'], 'url', 'status_code']]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>


Exemple #17
0
    <h3 class="lte-hide-title"><?php 
echo Html::encode($this->title);
?>
</h3>

    <div class="panel panel-default">
        <div class="panel-body">
            <?php 
echo Html::a(Yii::t('yee', 'Edit'), ['/page/default/update', 'id' => $model->id], ['class' => 'btn btn-sm btn-primary']);
?>
            <?php 
echo Html::a(Yii::t('yee', 'Delete'), ['/page/default/delete', 'id' => $model->id], ['class' => 'btn btn-sm btn-default', 'data' => ['confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
?>
            <?php 
echo Html::a(Yii::t('yee', 'Add New'), ['/page/default/create'], ['class' => 'btn btn-sm btn-primary pull-right']);
?>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-body">
            <h2><?php 
echo $model->title;
?>
</h2>
            <?php 
echo $model->content;
?>
        </div>
    </div>
Exemple #18
0
?>
-media-frame">
    <div class="col-sm-8">

        <div class="panel panel-default">
            <div class="panel-body">
                <div id="media" data-frame-mode="<?php 
echo $mode;
?>
" data-url-info="<?php 
echo Url::to(['/media/manage/info']);
?>
">
                    <?php 
echo ListView::widget(['dataProvider' => $dataProvider, 'layout' => '<div class="items">{items}</div><div class="text-center">{pager}</div>', 'itemOptions' => ['class' => 'item'], 'itemView' => function ($model, $key, $index, $widget) {
    return Html::a(Html::img($model->getDefaultThumbUrl($this->params['moduleBundle']->baseUrl)), '#mediafile', ['data-key' => $key]);
}, 'pager' => ['options' => ['class' => 'pagination pagination-sm', 'style' => 'display: inline-block;']]]);
?>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-4">

        <div class="panel panel-default">
            <div class="panel-body media-details">
                <div class="dashboard">
                    <h5><?php 
echo Yii::t('yee/media', 'Media Details');
?>
:</h5>
Exemple #19
0
?>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-body">

            <div class="row">
                <div class="col-sm-12 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'media-category-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'media-category-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'media-category-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'media-category-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yee', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/media/category', 'title' => function (Category $model) {
    return Html::a($model->title, ['/media/category/update', 'id' => $model->id], ['data-pjax' => 0]);
}, 'buttonsTemplate' => '{update} {delete}'], 'description:ntext', ['class' => 'yeesoft\\grid\\columns\\StatusColumn', 'attribute' => 'visible']]]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>
Exemple #20
0
?>
                </div>

                <div class="col-sm-6 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'eav-attribute-option-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'eav-attribute-option-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'eav-attribute-option-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'eav-attribute-option-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yee', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['attribute' => 'id', 'options' => ['style' => 'width:20px']], ['class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'attribute' => 'value', 'controller' => '/eav/attribute-option', 'buttonsTemplate' => '{update} {delete}', 'title' => function (EavAttributeOption $model) {
    return Html::a($model->value, ['update', 'id' => $model->id], ['data-pjax' => 0]);
}], ['attribute' => 'attribute_id', 'value' => function (EavAttributeOption $model) {
    return "{$model->attribute->id} - {$model->attribute->name} - {$model->attribute->label}";
}, 'filter' => ArrayHelper::merge(['' => Yii::t('yee', 'Not Selected')], EavAttribute::getEavAttributes()), 'options' => ['style' => 'width:300px']]]]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>


Exemple #21
0
if ($model->isNewRecord) {
    ?>
                                <?php 
    echo Html::submitButton(Yii::t('yee', 'Create'), ['class' => 'btn btn-primary']);
    ?>
                                <?php 
    echo Html::a(Yii::t('yee', 'Cancel'), ['/block/default/index'], ['class' => 'btn btn-default']);
    ?>
                            <?php 
} else {
    ?>
                                <?php 
    echo Html::submitButton(Yii::t('yee', 'Save'), ['class' => 'btn btn-primary']);
    ?>
                                <?php 
    echo Html::a(Yii::t('yee', 'Delete'), ['/block/default/delete', 'id' => $model->id], ['class' => 'btn btn-default', 'data' => ['confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
    ?>
                            <?php 
}
?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php 
ActiveForm::end();
?>
Exemple #22
0
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'role-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'role-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'role-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'role-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yee', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['attribute' => 'description', 'class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/user/role', 'title' => function (Role $model) {
    return Html::a($model->description, ['view', 'id' => $model->name], ['data-pjax' => 0]);
}, 'buttons' => ['view' => function ($url, $model, $key) {
    $options = array_merge(['title' => Yii::t('yee', 'Settings'), 'aria-label' => Yii::t('yee', 'Settings'), 'data-pjax' => '0']);
    return Html::a(Yii::t('yee', 'Settings'), $url, $options);
}]], ['attribute' => 'name', 'options' => ['style' => 'width:200px']]]]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>





Exemple #23
0
            <div class="row">
                <div class="col-sm-12 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'post-category-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'post-category-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'post-category-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'post-category-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yee', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/post/category', 'title' => function (Category $model) {
    return Html::a($model->title, ['/post/category/update', 'id' => $model->id], ['data-pjax' => 0]);
}, 'buttonsTemplate' => '{update} {delete}'], ['attribute' => 'parent_id', 'value' => function (Category $model) {
    if ($parent = $model->getParent()->one() and $parent->id > 1) {
        return Html::a($parent->title, ['/post/category/update', 'id' => $parent->id], ['data-pjax' => 0]);
    } else {
        return '<span class="not-set">' . Yii::t('yii', '(not set)') . '</span>';
    }
}, 'format' => 'raw', 'filter' => Category::getCategories(), 'filterInputOptions' => ['class' => 'form-control', 'encodeSpaces' => true]], 'description:ntext', ['class' => 'yeesoft\\grid\\columns\\StatusColumn', 'attribute' => 'visible']]]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>
Exemple #24
0
?>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-body">

            <div class="row">
                <div class="col-sm-12 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'post-tag-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'post-tag-grid-pjax']);
?>

            <?php 
echo GridView::widget(['id' => 'post-tag-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'post-tag-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yee', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/post/tag', 'title' => function (Tag $model) {
    return Html::a($model->title, ['/post/tag/update', 'id' => $model->id], ['data-pjax' => 0]);
}, 'buttonsTemplate' => '{update} {delete}'], 'slug']]);
?>

            <?php 
Pjax::end();
?>
        </div>
    </div>
</div>