Skip to content

Commit

Permalink
update gridViewColumns setup for assignment controller
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-chepurnoi committed Oct 31, 2016
1 parent c943172 commit 3219ffd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 1 addition & 5 deletions controllers/AssignmentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ public function init()
if (empty($this->gridViewColumns)) {
$this->gridViewColumns = [
$this->idField,
$this->usernameField,
[
'class' => 'yii\grid\ActionColumn',
'template' => '{view}'
]
$this->usernameField
];
}

Expand Down
8 changes: 7 additions & 1 deletion views/assignment/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

use yii\grid\GridView;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\widgets\Pjax;

Expand All @@ -22,7 +23,12 @@
<?php echo GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => $gridViewColumns
'columns' => ArrayHelper::merge($gridViewColumns, [
[
'class' => 'yii\grid\ActionColumn',
'template' => '{view}'
]
])
]); ?>

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

0 comments on commit 3219ffd

Please sign in to comment.