Skip to content

Commit

Permalink
Budget: improved design, opacity for done expences and bold names for…
Browse files Browse the repository at this point in the history
… incomes
  • Loading branch information
boryashkin committed Feb 10, 2017
1 parent 907d517 commit 65dcbb3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion modules/budget/views/index/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,24 @@
<?= GridView::widget([
'dataProvider' => $dataProvider,
'showFooter' => true,
'rowOptions'=> function($model) {
/** @var \app\modules\budget\models\Budget $model */
if ($model->done) {
return ['style' => 'opacity: 0.5'];
}
},
'columns' => [
['class' => 'yii\grid\SerialColumn'],

'name',
[
'attribute' => 'name',
'contentOptions' => function ($model) {
$weight = $model['expectedSum'] > 0 ? 'bold' : 'inherit';
return ['style' => "font-weight: {$weight};"];
},
],
/*[
// if expected date has been changed
'attribute' => 'firstExpectedDate',
'format' => ['dateTime', 'php:d.m.Y']
],*/
Expand Down

0 comments on commit 65dcbb3

Please sign in to comment.