Ejemplo n.º 1
0
$this->params['breadcrumbs'][] = ['label' => Yii::t('yee/user', 'Users'), 'url' => ['/user/default/index']];
$this->params['breadcrumbs'][] = ['label' => Yii::t('yee/user', 'Roles'), 'url' => ['/user/role/index']];
$this->params['breadcrumbs'][] = $this->title;
?>

    <div class="row">
        <div class="col-sm-12">
            <h3 class="lte-hide-title page-title"><?php 
echo Html::encode($this->title);
?>
</h3>
            <?php 
echo Html::a(Yii::t('yee', 'Edit'), ['update', 'id' => $role->name], ['class' => 'btn btn-sm btn-primary']);
?>
            <?php 
echo Html::a(Yii::t('yee', 'Create'), ['create'], ['class' => 'btn btn-sm btn-primary']);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <strong>
                        <span
                            class="glyphicon glyphicon-th"></span> <?php 
echo Yii::t('yee/user', 'Child roles');
?>
                    </strong>
                </div>
Ejemplo n.º 2
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]);
Ejemplo n.º 3
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>


Ejemplo n.º 4
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>


Ejemplo n.º 5
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>


Ejemplo n.º 6
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();
Ejemplo n.º 7
0
                            </h4>
                        <?php 
} else {
    ?>

                            <?php 
    $form = ActiveForm::begin();
    ?>

                            <?php 
    foreach ($messages as $index => $message) {
        ?>
                                <?php 
        $links = '';
        if (User::hasPermission('updateSourceMessages') && (!$message->source->immutable || User::hasPermission('updateImmutableSourceMessages'))) {
            $links .= ' ' . Html::a('<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>', ['/translation/source/update', 'id' => $message->source_id]);
        }
        ?>

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

                            <?php 
    }
    ?>

                            <?php 
    if (User::hasPermission('updateSourceMessages')) {
        ?>
                                <?php 
Ejemplo n.º 8
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>


Ejemplo n.º 9
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>


Ejemplo n.º 10
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.');
    ?>
Ejemplo n.º 11
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>


Ejemplo n.º 12
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>
Ejemplo n.º 13
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>
Ejemplo n.º 14
0
 /**
  * Initializes the default button rendering callbacks.
  */
 protected function initDefaultButtons()
 {
     if (!isset($this->buttons['view'])) {
         $this->buttons['view'] = function ($url, $model, $key) {
             $options = array_merge(['title' => Yii::t('yee', 'View'), 'aria-label' => Yii::t('yee', 'View'), 'data-pjax' => '0'], $this->buttonOptions);
             return Html::a(Yii::t('yee', 'View'), $url, $options);
         };
     }
     if (!isset($this->buttons['update'])) {
         $this->buttons['update'] = function ($url, $model, $key) {
             $options = array_merge(['title' => Yii::t('yee', 'Edit'), 'aria-label' => Yii::t('yee', 'Edit'), 'data-pjax' => '0'], $this->buttonOptions);
             return Html::a(Yii::t('yee', 'Edit'), $url, $options);
         };
     }
     if (!isset($this->buttons['delete'])) {
         $this->buttons['delete'] = function ($url, $model, $key) {
             $options = array_merge(['title' => Yii::t('yee', 'Delete'), 'aria-label' => Yii::t('yee', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0'], $this->buttonOptions);
             return Html::a(Yii::t('yee', 'Delete'), $url, $options);
         };
     }
 }
Ejemplo n.º 15
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>
Ejemplo n.º 16
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>
Ejemplo n.º 17
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>
Ejemplo n.º 18
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>


Ejemplo n.º 19
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();
?>
Ejemplo n.º 20
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>





Ejemplo n.º 21
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>
Ejemplo n.º 22
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>