@@ -19,7 +19,7 @@ |
||
| 19 | 19 | public function init(): void |
| 20 | 20 | { |
| 21 | 21 | if (App::$Request->getLanguage() !== 'en') { |
| 22 | - App::$Translate->append('/i18n/Front/' . App::$Request->getLanguage() . '/CommentWidget.php'); |
|
| 22 | + App::$Translate->append('/i18n/Front/'.App::$Request->getLanguage().'/CommentWidget.php'); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | if (!$this->pathway) { |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | <div class="row mb-1"> |
| 15 | 15 | <div class="col-md-6"> |
| 16 | 16 | <i class="fa fa-user"></i> |
| 17 | - <?php if ((int)$comment['user']['id'] > 0): ?> |
|
| 17 | + <?php if ((int) $comment['user']['id'] > 0): ?> |
|
| 18 | 18 | <?= Url::a(['profile/show', [$comment['user']['id']]], $comment['user']['name']) ?> |
| 19 | 19 | <?php else: ?> |
| 20 | 20 | <?= $comment['user']['name'] ?> |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | <div class="row"> |
| 31 | 31 | <div class="col"> |
| 32 | - <a href="<?= \App::$Alias->baseUrl . $comment['pathway'] . '#comment-list' ?>"> |
|
| 32 | + <a href="<?= \App::$Alias->baseUrl.$comment['pathway'].'#comment-list' ?>"> |
|
| 33 | 33 | <?= Text::cut(\App::$Security->strip_tags($comment['text']), 0, $snippet) ?> |
| 34 | 34 | </a> |
| 35 | 35 | </div> |
@@ -16,9 +16,12 @@ |
||
| 16 | 16 | <i class="fa fa-user"></i> |
| 17 | 17 | <?php if ((int)$comment['user']['id'] > 0): ?> |
| 18 | 18 | <?= Url::a(['profile/show', [$comment['user']['id']]], $comment['user']['name']) ?> |
| 19 | - <?php else: ?> |
|
| 19 | + <?php else { |
|
| 20 | + : ?> |
|
| 20 | 21 | <?= $comment['user']['name'] ?> |
| 21 | - <?php endif; ?> |
|
| 22 | + <?php endif; |
|
| 23 | +} |
|
| 24 | +?> |
|
| 22 | 25 | </div> |
| 23 | 26 | <div class="col-md-6 pull-right"> |
| 24 | 27 | <small class="text-secondary pull-right"> |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | /** @var \Ffcms\Templex\Template\Template $this */ |
| 4 | 4 | ?> |
| 5 | 5 | |
| 6 | -<?php if ((bool)$configs['guestAdd'] && (bool)$configs['guestModerate'] && !\App::$User->isAuth()): ?> |
|
| 6 | +<?php if ((bool) $configs['guestAdd'] && (bool) $configs['guestModerate'] && !\App::$User->isAuth()): ?> |
|
| 7 | 7 | <p class="alert alert-warning"><?= $this->bootstrap()->alert('warning', __('All guest comments will be moderated before display')) ?></p> |
| 8 | 8 | <?php endif; ?> |
| 9 | 9 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | </a> |
| 36 | 36 | </i> |
| 37 | 37 | </div> |
| 38 | - <div id="comment-text" class="comment-text"><?= __('Loading') . ' ...' ?></div> |
|
| 38 | + <div id="comment-text" class="comment-text"><?= __('Loading').' ...' ?></div> |
|
| 39 | 39 | </div> |
| 40 | 40 | <div id="comment-answers-0" class="d-none"></div> |
| 41 | 41 | <div class="row d-none" id="add-replay-to"> |
@@ -58,12 +58,12 @@ discard block |
||
| 58 | 58 | <span id="answer-date">00.00.00 00-00-00</span> |
| 59 | 59 | <span id="answer-user-name"><?= __('Unknown') ?></span>: |
| 60 | 60 | </div> |
| 61 | - <div id="answer-text" class="comment-text"><?= __('Loading') . ' ...' ?></div> |
|
| 61 | + <div id="answer-text" class="comment-text"><?= __('Loading').' ...' ?></div> |
|
| 62 | 62 | </div> |
| 63 | 63 | </li> |
| 64 | 64 | </ul> |
| 65 | 65 | |
| 66 | -<?php if ((bool)$configs['guestAdd'] || \App::$User->isAuth()): ?> |
|
| 66 | +<?php if ((bool) $configs['guestAdd'] || \App::$User->isAuth()): ?> |
|
| 67 | 67 | <!-- comment form --> |
| 68 | 68 | <form name="comment-add-form" action="" method="post" style="padding-top: 15px;" class="form-horizontal"> |
| 69 | 69 | <input type="hidden" name="replay-to" value="0" /> |
@@ -77,7 +77,8 @@ discard block |
||
| 77 | 77 | </div> |
| 78 | 78 | <?php if (\App::$Captcha->isFull()): ?> |
| 79 | 79 | <div class="col-md-offset-3 col-md-9"><?= \App::$Captcha->get() ?></div> |
| 80 | - <?php else: ?> |
|
| 80 | + <?php else { |
|
| 81 | + : ?> |
|
| 81 | 82 | <div class="form-group"> |
| 82 | 83 | <label for="guest-captcha" class="col-sm-3 control-label"><?= __('Captcha') ?>:</label> |
| 83 | 84 | <div class="col-sm-9"> |
@@ -85,7 +86,9 @@ discard block |
||
| 85 | 86 | <input id="guest-captcha" type="text" name="captcha" class="form-control" required> |
| 86 | 87 | </div> |
| 87 | 88 | </div> |
| 88 | - <?php endif; ?> |
|
| 89 | + <?php endif; |
|
| 90 | +} |
|
| 91 | +?> |
|
| 89 | 92 | <?php endif; ?> |
| 90 | 93 | <textarea class="form-control wysiwyg" name="message"></textarea> |
| 91 | 94 | </form> |