@@ -23,8 +23,9 @@ |
||
23 | 23 | <ul class="files" style="list-style: none; margin: 0;" id="files-<?php echo $object->getPrimaryKey(); ?>"> |
24 | 24 | <?php foreach ($files as $file) : ?> |
25 | 25 | <?php |
26 | - if ($file->getMimeBaseType() == "image" && $hideImageFileInfo) |
|
27 | - continue; |
|
26 | + if ($file->getMimeBaseType() == "image" && $hideImageFileInfo) { |
|
27 | + continue; |
|
28 | + } |
|
28 | 29 | ?> |
29 | 30 | <li class="mime <?php echo \humhub\libs\MimeHelper::getMimeIconClassByExtension($file->getExtension()); ?>"><a |
30 | 31 | href="<?php echo $file->getUrl(); ?>" target="_blank"><span |
@@ -10,11 +10,13 @@ |
||
10 | 10 | class="" |
11 | 11 | title="" data-target="#globalModal" |
12 | 12 | data-original-title="Comments">Comments - <?php echo $this->context->getCommentsCount(); ?></a> |
13 | -<?php else: ?> |
|
13 | +<?php else { |
|
14 | + : ?> |
|
14 | 15 | <div class="pull-right"> |
15 | 16 | <?php |
16 | 17 | if (Yii::$app->user->isGuest) { |
17 | 18 | echo Html::a(Yii::t('CommentModule.widgets_views_link', "<i class='fa fa-comments-o'></i>"), Yii::$app->user->loginUrl, array('data-target' => '#globalModal')); |
19 | +} |
|
18 | 20 | } else { |
19 | 21 | echo Html::a(Yii::t('CommentModule.widgets_views_link', "<i class='fa fa-comments-o'></i>"), "#", array('onClick' => "$('#comment_" . $id . "').show();$('#newCommentForm_" . $id . "_contenteditable').focus();return false;")); |
20 | 22 | } |
@@ -24,16 +24,16 @@ discard block |
||
24 | 24 | <?php if ($canWrite): ?> |
25 | 25 | <li> |
26 | 26 | <?php |
27 | - echo AjaxButton::widget([ |
|
28 | - 'label' => '<i class="fa fa-pencil"></i> ' . Yii::t('CommentModule.widgets_views_showComment', 'Edit'), |
|
29 | - 'ajaxOptions' => [ |
|
30 | - 'type' => 'POST', |
|
31 | - 'success' => new yii\web\JsExpression("function(html){ $('.preferences .dropdown').removeClass('open'); $('#comment_editarea_" . $comment->id . "').replaceWith(html); $('#comment_input_" . $comment->id . "_contenteditable').focus(); }"), |
|
32 | - 'url' => Url::to(['/comment/comment/edit', 'contentModel' => $comment->object_model, 'contentId' => $comment->object_id, 'id' => $comment->id]), |
|
33 | - ], |
|
34 | - 'tag' => 'a' |
|
35 | - ]); |
|
36 | - ?> |
|
27 | + echo AjaxButton::widget([ |
|
28 | + 'label' => '<i class="fa fa-pencil"></i> ' . Yii::t('CommentModule.widgets_views_showComment', 'Edit'), |
|
29 | + 'ajaxOptions' => [ |
|
30 | + 'type' => 'POST', |
|
31 | + 'success' => new yii\web\JsExpression("function(html){ $('.preferences .dropdown').removeClass('open'); $('#comment_editarea_" . $comment->id . "').replaceWith(html); $('#comment_input_" . $comment->id . "_contenteditable').focus(); }"), |
|
32 | + 'url' => Url::to(['/comment/comment/edit', 'contentModel' => $comment->object_model, 'contentId' => $comment->object_id, 'id' => $comment->id]), |
|
33 | + ], |
|
34 | + 'tag' => 'a' |
|
35 | + ]); |
|
36 | + ?> |
|
37 | 37 | |
38 | 38 | </li> |
39 | 39 | <?php endif; ?> |
@@ -43,18 +43,18 @@ discard block |
||
43 | 43 | |
44 | 44 | <!-- load modal confirm widget --> |
45 | 45 | <?php |
46 | - echo humhub\widgets\ModalConfirm::widget(array( |
|
47 | - 'uniqueID' => 'modal_commentdelete_' . $comment->id, |
|
48 | - 'linkOutput' => 'a', |
|
49 | - 'title' => Yii::t('CommentModule.widgets_views_showComment', '<strong>Confirm</strong> comment deleting'), |
|
50 | - 'message' => Yii::t('CommentModule.widgets_views_showComment', 'Do you really want to delete this comment?'), |
|
51 | - 'buttonTrue' => Yii::t('CommentModule.widgets_views_showComment', 'Delete'), |
|
52 | - 'buttonFalse' => Yii::t('CommentModule.widgets_views_showComment', 'Cancel'), |
|
53 | - 'linkContent' => '<i class="fa fa-trash-o"></i> ' . Yii::t('CommentModule.widgets_views_showComment', 'Delete'), |
|
54 | - 'linkHref' => Url::to(["/comment/comment/delete", 'contentModel' => $comment->object_model, 'contentId' => $comment->object_id, 'id' => $comment->id]), |
|
55 | - 'confirmJS' => "function(html) { $('#comment_" . $comment->id . "').slideUp(); }" |
|
56 | - )); |
|
57 | - ?> |
|
46 | + echo humhub\widgets\ModalConfirm::widget(array( |
|
47 | + 'uniqueID' => 'modal_commentdelete_' . $comment->id, |
|
48 | + 'linkOutput' => 'a', |
|
49 | + 'title' => Yii::t('CommentModule.widgets_views_showComment', '<strong>Confirm</strong> comment deleting'), |
|
50 | + 'message' => Yii::t('CommentModule.widgets_views_showComment', 'Do you really want to delete this comment?'), |
|
51 | + 'buttonTrue' => Yii::t('CommentModule.widgets_views_showComment', 'Delete'), |
|
52 | + 'buttonFalse' => Yii::t('CommentModule.widgets_views_showComment', 'Cancel'), |
|
53 | + 'linkContent' => '<i class="fa fa-trash-o"></i> ' . Yii::t('CommentModule.widgets_views_showComment', 'Delete'), |
|
54 | + 'linkHref' => Url::to(["/comment/comment/delete", 'contentModel' => $comment->object_model, 'contentId' => $comment->object_id, 'id' => $comment->id]), |
|
55 | + 'confirmJS' => "function(html) { $('#comment_" . $comment->id . "').slideUp(); }" |
|
56 | + )); |
|
57 | + ?> |
|
58 | 58 | </li> |
59 | 59 | <?php endif; ?> |
60 | 60 | </ul> |