Commit a6942fb20747c9bc7e078f7bf275dbf297931061
1 parent
8d2dca3f
tile fix
Showing
1 changed file
with
11 additions
and
1 deletions
Show diff stats
backend/views/tile/view.php
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | +use common\models\Tile; | |
| 3 | 4 | use yii\helpers\Html; |
| 4 | 5 | use yii\widgets\DetailView; |
| 5 | 6 | |
| ... | ... | @@ -29,7 +30,16 @@ $this->params['breadcrumbs'][] = $this->title; |
| 29 | 30 | 'model' => $model, |
| 30 | 31 | 'attributes' => [ |
| 31 | 32 | 'id', |
| 32 | - 'link', | |
| 33 | + [ | |
| 34 | + 'attribute' => 'link', | |
| 35 | + 'value' => function (Tile $model) { | |
| 36 | + if (empty($model->lang->link)) { | |
| 37 | + return ''; | |
| 38 | + } else { | |
| 39 | + return $model->lang->link; | |
| 40 | + } | |
| 41 | + }, | |
| 42 | + ], | |
| 33 | 43 | 'status:boolean', |
| 34 | 44 | 'sort', |
| 35 | 45 | 'image_id', | ... | ... |