Ejemplo n.º 1
0
        <div class="row">
            <div class="col-sm-12">
                <h3 class="lte-hide-title page-title"><?php 
echo Html::encode($this->title);
?>
</h3>
            </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' => 'user-visit-log-grid-pjax']);
?>
                    </div>
                </div>

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

                <?php 
echo GridView::widget(['id' => 'user-visit-log-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActions' => ' ', 'columns' => [['attribute' => 'user_id', 'class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/user/visit-log', 'title' => function ($model) {
    return Html::a(@$model->user->username, ['view', 'id' => $model->id], ['data-pjax' => 0]);
}, 'buttonsTemplate' => ''], 'language', 'os', 'browser', array('attribute' => 'ip', 'value' => function ($model) {
    return Html::a($model->ip, "http://ipinfo.io/" . $model->ip, ["target" => "_blank"]);
}, 'format' => 'raw'), ['attribute' => 'visit_time', 'value' => function ($model) {
    return $model->visitDatetime;
Ejemplo n.º 2
0
echo Html::encode($this->title);
?>
</h3>
            <?php 
echo Html::a(Yii::t('yee', 'Add New'), ['/post/category/create'], ['class' => 'btn btn-sm btn-primary']);
?>
        </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-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 {
Ejemplo n.º 3
0
        <div class="panel-body">

            <div class="row">
                <div class="col-sm-6">
                    <?php 
/* Uncomment this to activate GridQuickLinks */
/* echo GridQuickLinks::widget([
       'model' => EavAttributeType::className(),
       'searchModel' => $searchModel,
   ])*/
?>
                </div>

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

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

            <?php 
echo GridView::widget(['id' => 'eav-attribute-type-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'eav-attribute-type-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' => 'name', 'controller' => '/eav/attribute-type', 'buttonsTemplate' => '{update} {delete}', 'title' => function (EavAttributeType $model) {
    return Html::a($model->name, ['update', 'id' => $model->id], ['data-pjax' => 0]);
}], ['attribute' => 'store_type', 'value' => function (EavAttributeType $model) {
    $types = EavAttributeType::getStoreTypes();
    return isset($types[$model->store_type]) ? $types[$model->store_type] : Yii::t('yii', '(not set)');
}, 'filter' => ArrayHelper::merge(['' => Yii::t('yee', 'Not Selected')], EavAttributeType::getStoreTypes())]]]);
Ejemplo n.º 4
0
echo Html::encode($this->title);
?>
</h3>
            <?php 
echo Html::a(Yii::t('yee', 'Add New'), ['create'], ['class' => 'btn btn-sm btn-primary']);
?>
        </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' => '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;
    }
Ejemplo n.º 5
0
        </div>
    </div>

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

            <div class="row">
                <div class="col-sm-6">
                    <?php 
echo GridQuickLinks::widget(['model' => Comment::className(), 'searchModel' => $searchModel, 'options' => [['label' => Yii::t('yee', 'Approved'), 'filterWhere' => ['status' => Comment::STATUS_APPROVED]], ['label' => Yii::t('yee', 'Pending'), 'filterWhere' => ['status' => Comment::STATUS_PENDING]], ['label' => Yii::t('yee', 'Spam'), 'filterWhere' => ['status' => Comment::STATUS_SPAM]], ['label' => Yii::t('yee', 'Trash'), 'filterWhere' => ['status' => Comment::STATUS_TRASH]]]]);
?>
                </div>

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

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

            <?php 
echo GridView::widget(['id' => 'comment-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'comment-grid', 'actions' => [Url::to(['bulk-activate']) => Comments::t('comments', 'Approve'), Url::to(['bulk-deactivate']) => Comments::t('comments', 'Unapprove'), Url::to(['bulk-spam']) => Comments::t('comments', 'Mark as Spam'), Url::to(['bulk-trash']) => Comments::t('comments', 'Move to Trash'), Url::to(['bulk-delete']) => Yii::t('yee', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/comment/default', 'attribute' => 'content', 'title' => function (Comment $model) {
    return Html::a(mb_substr($model->content, 0, 32) . '...', ['/comment/default/update', 'id' => $model->id], ['data-pjax' => 0]);
}, 'buttonsTemplate' => '{update} {delete}'], ['label' => Yii::t('yee', 'User'), 'value' => function (Comment $model) {
    return $model->getAuthor();
}, 'options' => ['style' => 'width:150px']], ['attribute' => 'model', 'value' => function (Comment $model) {
    return $model->model . ($model->model_id ? ' [' . $model->model_id . ']' : '');
Ejemplo n.º 6
0
        <div class="panel-body">

            <div class="row">
                <div class="col-sm-6">
                    <?php 
/* Uncomment this to activate GridQuickLinks */
/* echo GridQuickLinks::widget([
   'model' => Trip::className(),
   'searchModel' => $searchModel,
   ]) */
?>
                </div>

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

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

            <?php 
echo GridView::widget(['id' => 'trip-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'trip-grid', 'actions' => [Url::to(['bulk-delete']) => Yii::t('yee', 'Delete')]], 'columns' => [['class' => 'yeesoft\\grid\\CheckboxColumn', 'options' => ['style' => 'width:10px']], ['attribute' => 'vehicle_model', 'class' => 'yeesoft\\grid\\columns\\TitleActionColumn', 'controller' => '/trip/default', 'title' => function (Trip $model) {
    $vehicle = $model->getVehicles()[$model->vehicle] . ' > ' . Html::encode($model->vehicle_model);
    return Html::a($vehicle, ['update', 'id' => $model->id], ['data-pjax' => 0]);
}, 'buttonsTemplate' => '{update} {delete}', 'options' => ['style' => 'width:260px']], 'city_from', 'city_to', ['attribute' => 'created_by', 'filter' => User::getUsersList(), 'value' => function (Trip $model) {
    return Html::a(Html::encode($model->author->username), ['/user/default/update', 'id' => $model->created_by], ['data-pjax' => 0]);
}, 'format' => 'raw', 'visible' => User::hasPermission('viewUsers')], ['class' => 'yeesoft\\grid\\columns\\StatusColumn', 'attribute' => 'type', 'optionsArray' => Trip::getTypeOptionsList(), 'options' => ['style' => 'width:60px']], ['class' => 'yeesoft\\grid\\columns\\StatusColumn', 'attribute' => 'status', 'optionsArray' => Trip::getStatusOptionsList(), 'options' => ['style' => 'width:60px']]]]);
Ejemplo n.º 7
0
            <?php 
echo Html::a(Yii::t('yee', 'Add New'), ['/media/album/create'], ['class' => 'btn btn-sm btn-primary']);
?>
            <?php 
echo Html::a(Yii::t('yee/media', 'Manage Categories'), ['/media/category/index'], ['class' => 'btn btn-sm btn-primary']);
?>
        </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' => 'album-grid-pjax']);
?>
                </div>
            </div>

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

            <?php 
echo GridView::widget(['id' => 'album-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'bulkActionOptions' => ['gridId' => 'album-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/album', 'title' => function (Album $model) {
    return Html::a($model->title, ['/media/album/update', 'id' => $model->id], ['data-pjax' => 0]);
}, 'buttonsTemplate' => '{update} {delete}'], 'description:ntext', ['attribute' => 'category_id', 'filter' => Category::getCategories(true), 'value' => function (Album $model) {
    return $model->category instanceof Category ? $model->category->title : Yii::t('yii', '(not set)');
}, 'format' => 'raw'], ['class' => 'yeesoft\\grid\\columns\\StatusColumn', 'attribute' => 'visible']]]);
?>
Ejemplo n.º 8
0
echo Html::encode($this->title);
?>
</h3>
            <?php 
echo Html::a(Yii::t('yee', 'Add New'), ['create'], ['class' => 'btn btn-sm btn-primary']);
?>
        </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' => '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']]]]);
Ejemplo n.º 9
0
        <div class="panel-body">

            <div class="row">
                <div class="col-sm-6">
                    <?php 
/* Uncomment this to activate GridQuickLinks */
/* echo GridQuickLinks::widget([
       'model' => EavEntityModel::className(),
       '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 
Ejemplo n.º 10
0
echo Html::encode($this->title);
?>
</h3>
            <?php 
echo Html::a(Yii::t('yee', 'Add New'), ['/menu/link/create'], ['class' => 'btn btn-sm btn-primary']);
?>
        </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' => '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)');
Ejemplo n.º 11
0
echo Html::encode($this->title);
?>
</h3>
            <?php 
echo Html::a(Yii::t('yee', 'Add New'), ['/post/tag/create'], ['class' => 'btn btn-sm btn-primary']);
?>
        </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