Skip to content

Commit

Permalink
change filter
Browse files Browse the repository at this point in the history
  • Loading branch information
PutraSudaryanto committed Mar 25, 2019
1 parent f957ec2 commit 058c820
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion models/SupportFeedbackSubject.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ public function init()
];
$this->templateColumns['feedbacks'] = [
'attribute' => 'feedbacks',
'filter' => false,
'value' => function($model, $key, $index, $column) {
$feedbacks = $model->getFeedbacks(true);
return Html::a($feedbacks, ['feedback/admin/manage', 'subject'=>$model->primaryKey, 'publish'=>1], ['title'=>Yii::t('app', '{count} feedbacks', ['count'=>$feedbacks])]);
},
'filter' => false,
'contentOptions' => ['class'=>'center'],
'format' => 'html',
];
Expand Down
2 changes: 1 addition & 1 deletion models/SupportFeedbackView.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ public function init()
];
$this->templateColumns['views'] = [
'attribute' => 'views',
'filter' => false,
'value' => function($model, $key, $index, $column) {
$views = $model->views;
return Html::a($views, ['feedback/view-detail/manage', 'view'=>$model->primaryKey], ['title'=>Yii::t('app', '{count} views', ['count'=>$views])]);
},
'filter' => false,
'contentOptions' => ['class'=>'center'],
'format' => 'html',
];
Expand Down
6 changes: 3 additions & 3 deletions models/SupportFeedbacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,31 +338,31 @@ public function init()
];
$this->templateColumns['views'] = [
'attribute' => 'views',
'filter' => false,
'value' => function($model, $key, $index, $column) {
$views = $model->getViews(true);
return Html::a($views, ['feedback/view/manage', 'feedback'=>$model->primaryKey, 'publish'=>1], ['title'=>Yii::t('app', '{count} views', ['count'=>$views])]);
},
'filter' => false,
'contentOptions' => ['class'=>'center'],
'format' => 'html',
];
$this->templateColumns['users'] = [
'attribute' => 'users',
'filter' => false,
'value' => function($model, $key, $index, $column) {
$users = $model->getUsers(true);
return Html::a($users, ['feedback/user/manage', 'feedback'=>$model->primaryKey, 'publish'=>1], ['title'=>Yii::t('app', '{count} users', ['count'=>$users])]);
},
'filter' => false,
'contentOptions' => ['class'=>'center'],
'format' => 'html',
];
$this->templateColumns['reply'] = [
'attribute' => 'reply',
'filter' => $this->filterYesNo(),
'value' => function($model, $key, $index, $column) {
$reply = $this->filterYesNo($model->reply);
return $model->reply == 0 ? Html::a($reply, ['reply', 'id'=>$model->primaryKey], ['title'=>Yii::t('app', 'Click to reply')]) : $reply;
},
'filter' => $this->filterYesNo(),
'contentOptions' => ['class'=>'center'],
'format' => 'html',
];
Expand Down

0 comments on commit 058c820

Please sign in to comment.