var Comments_Comment comment if isset comment comment div class commen

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<? /** @var Comments_Comment $comment */ ?>
<? if (isset($comment) && $comment): ?>
<div class="comment" id="comment-node-<?= $comment->id ?>">
<? if ($comment->status == Comments_Comment::deleted): ?>
<div class="deleted">Комментарий был удален</div>
<? else: ?>
<? if ($comment->author): ?>
<span class="author user<?= h($comment->author->id) ?> <?= $comment->author->type ? $comment->author->type : "" ?>"><strong><?= h($comment->author->getUserName()) ?>:</strong></span>
<? else: ?>
<span class="author anonimous"><strong>Анонимус</strong></span>
<? endif ?>
<div class="comment-body"><?= $comment->getMessage() ?></div>
<span class="date"><?= when($comment->publish_date) ?></span>
<? if (Auth_User::getCurrentUser()): ?>
<a href="#" onclick="replyToComment(<?= $comment->id ?>); return false;">Ответить</a>
<? endif ?>
<? endif ?>
<? if (Admin_ModuleSettings::get_module_parameter("comments", "as_tree")): ?>
<? foreach ($comment->children as $child): ?>
<? $this->renderPartial($this->getViewsDir() . "/application/_comments_comment.htm", array('comment' => $child), true, true) ?>
<? endforeach ?>
<? endif ?>
</div>
<? endif; ?>