<?php use app\base\widgets\ActionColumn\AdminActionColumn; use nagser\base\widgets\ActionColumn\ActionColumn; use nagser\base\widgets\GridView\GridView; use yii\bootstrap\Html; use yii\helpers\ArrayHelper; /** @var $dataProvider yii\data\ArrayDataProvider **/ $this->title = Yii::t('themes', 'Themes'); $this->params['breadcrumbs'][] = $this->title; ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['attribute' => 'preview', 'label' => Yii::t('themes', 'Preview'), 'format' => 'html', 'headerOptions' => ['style' => 'width: 220px;'], 'options' => ['style' => 'vertical-align: middle'], 'value' => function ($model) { return Html::img(Yii::$app->request->baseUrl . '/themes/' . ArrayHelper::getValue($model, 'dir') . '/preview.png', ['class' => 'img-responsive']); }], ['attribute' => 'name', 'label' => Yii::t('themes', 'Name'), 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'link', 'label' => Yii::t('themes', 'Link to description'), 'value' => function ($model) { return Html::a(Yii::t('themes', 'Description'), ArrayHelper::getValue($model, 'link'), ['class' => 'btn btn-default btn-sm', 'target' => '_blank']); }, 'format' => 'raw', 'vAlign' => GridView::ALIGN_MIDDLE], ['class' => ActionColumn::className(), 'template' => '{copy} {delete}', 'buttons' => ['copy' => function ($url, $model) { return Html::a(Html::tag('i', '', ['class' => 'fa fa-files-o']), $url, ['class' => 'btn btn-default btn-sm jsOpen', 'data-title' => Yii::t('themes', 'Copy theme')]); }]]]]);
<?php /** * @var $dataProvider array * @var $filterModel dektrium\rbac\models\Search * @var $this yii\web\View */ use app\base\widgets\ActionColumn\AdminActionColumn; use nagser\base\widgets\ActionColumn\ActionColumn; use yii\helpers\Url; use nagser\base\widgets\GridView\GridView; $this->title = Yii::t('rbac', 'Roles'); $this->params['breadcrumbs'][] = $this->title; ?> <?php $this->beginContent('@nagser/rbac/views/layout.php'); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $filterModel, 'columns' => [['attribute' => 'name', 'header' => Yii::t('rbac', 'Name'), 'options' => ['style' => 'width: 20%'], 'contentOptions' => ['style' => 'text-align: left'], 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'name']]]], ['attribute' => 'description', 'header' => Yii::t('rbac', 'Description'), 'options' => ['style' => 'width: 55%'], 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'description']]]], ['attribute' => 'rule_name', 'header' => Yii::t('rbac', 'Rule name'), 'options' => ['style' => 'width: 20%'], 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'rule_name']]]], ['class' => ActionColumn::className(), 'template' => '{update} {delete}', 'urlCreator' => function ($action, $model) { return Url::to(['/rbac/role/' . $action, 'name' => $model['name']]); }, 'options' => ['style' => 'width: 5%']]]]); ?> <?php $this->endContent();
<?php use nagser\base\widgets\GridView\GridView; /* @var $this yii\web\View */ /* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $modelSearch nagser\logger\models\LoggerSearch */ /* @var $model nagser\logger\models\LoggerRecord */ $this->title = Yii::t('logger', 'Logs list'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="logger-record-index"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $modelSearch, 'columns' => [['label' => Yii::t('logger', 'Id'), 'value' => 'id', 'attribute' => 'id', 'headerOptions' => ['style' => 'width: 115px;'], 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'id']]]], ['label' => Yii::t('logger', 'Category'), 'value' => 'category', 'attribute' => 'category', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'category']]]], ['label' => Yii::t('logger', 'Level'), 'value' => 'level', 'attribute' => 'level', 'headerOptions' => ['style' => 'width: 115px;'], 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'level']]]], ['class' => \nagser\base\widgets\ActionColumn\ActionColumn::className(), 'template' => '{view} {delete}', 'viewOptions' => ['class' => 'btn btn-sm btn-default jsOpen']]]]); ?> </div>
<?php /* @var $this yii\web\View */ use nagser\base\widgets\GridView\GridView; /* @var $modelSearch nagser\gallery\models\GallerySearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('gallery', 'Gallery list'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="gallery-record-index"> <p style="margin-bottom: 10px;"><?php echo \yii\bootstrap\Html::a(Yii::t('gallery', 'Upload file'), ['update'], ['class' => 'btn btn-default']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $modelSearch, 'columns' => [['label' => '#', 'value' => 'id', 'attribute' => 'id', 'headerOptions' => ['style' => 'width: 115px;'], 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'id']]]], ['label' => Yii::t('gallery', 'Title'), 'value' => 'title', 'attribute' => 'title', 'headerOptions' => ['style' => 'width: 115px;'], 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'title']]]], ['label' => Yii::t('gallery', 'Type'), 'value' => 'type', 'attribute' => 'type', 'headerOptions' => ['style' => 'width: 115px;'], 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'type']]]], ['label' => Yii::t('gallery', 'Author'), 'value' => 'author_id', 'attribute' => 'author_id', 'headerOptions' => ['style' => 'width: 115px;'], 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'author_id']]]], ['label' => Yii::t('gallery', 'Updated'), 'value' => 'updated_at', 'attribute' => 'updated_at', 'headerOptions' => ['style' => 'width: 115px;'], 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'updated_at']]]], ['label' => Yii::t('gallery', 'Created'), 'value' => 'created_at', 'attribute' => 'created_at', 'headerOptions' => ['style' => 'width: 115px;'], 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['ajax' => ['colAlias' => 'created_at']]]], ['class' => \nagser\base\widgets\ActionColumn\ActionColumn::className()]]]); ?> </div>