@@ -36,8 +36,11 @@ |
||
36 | 36 | 'id' => 'editable-comment-' . $model->id, |
37 | 37 | ], |
38 | 38 | ]); ?> |
39 | - <?php else: ?> |
|
40 | - <?php echo $model->getContent(); ?> |
|
39 | + <?php else { |
|
40 | + : ?> |
|
41 | + <?php echo $model->getContent(); |
|
42 | +} |
|
43 | +?> |
|
41 | 44 | <?php endif; ?> |
42 | 45 | </div> |
43 | 46 | </div> |
@@ -29,14 +29,14 @@ discard block |
||
29 | 29 | [ |
30 | 30 | 'attribute' => 'content', |
31 | 31 | 'contentOptions' => ['style' => 'max-width: 350px;'], |
32 | - 'value' => function ($model) { |
|
32 | + 'value' => function($model) { |
|
33 | 33 | return StringHelper::truncate($model->content, 100); |
34 | 34 | }, |
35 | 35 | ], |
36 | 36 | 'attribute' => 'relatedTo', |
37 | 37 | [ |
38 | 38 | 'attribute' => 'createdBy', |
39 | - 'value' => function ($model) { |
|
39 | + 'value' => function($model) { |
|
40 | 40 | return $model->getAuthorName(); |
41 | 41 | }, |
42 | 42 | 'filter' => $commentModel::getAuthors(), |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | ], |
45 | 45 | [ |
46 | 46 | 'attribute' => 'status', |
47 | - 'value' => function ($model) { |
|
47 | + 'value' => function($model) { |
|
48 | 48 | return Status::getLabel($model->status); |
49 | 49 | }, |
50 | 50 | 'filter' => Status::listData(), |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | ], |
53 | 53 | [ |
54 | 54 | 'attribute' => 'createdAt', |
55 | - 'value' => function ($model) { |
|
55 | + 'value' => function($model) { |
|
56 | 56 | return Yii::$app->formatter->asDatetime($model->createdAt); |
57 | 57 | }, |
58 | 58 | 'filter' => false, |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | 'class' => 'yii\grid\ActionColumn', |
63 | 63 | 'template' => '{view}{update}{delete}', |
64 | 64 | 'buttons' => [ |
65 | - 'view' => function ($url, $model, $key) { |
|
65 | + 'view' => function($url, $model, $key) { |
|
66 | 66 | $title = Yii::t('yii2mod.comments', 'View'); |
67 | 67 | $options = [ |
68 | 68 | 'title' => $title, |