01c54d4d83
Squash
43 lines
1.6 KiB
PHTML
43 lines
1.6 KiB
PHTML
<div class="comment">
|
|
<div class="avatar">
|
|
<?php if ($this->context->comment->commenter): ?>
|
|
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->comment->commenter->name]) ?>">
|
|
<img src="<?php echo htmlspecialchars($this->context->comment->commenter->getAvatarUrl(40)) ?>" alt="<?php echo $this->context->comment->commenter->name ?>"/>
|
|
</a>
|
|
<?php else: ?>
|
|
<img src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="<?php echo Model_User::getAnonymousName() ?>">
|
|
<?php endif ?>
|
|
</div>
|
|
|
|
<div class="body">
|
|
<div class="header">
|
|
<span class="nickname">
|
|
<?php if ($this->context->comment->commenter): ?>
|
|
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->comment->commenter->name]) ?>">
|
|
<?php echo $this->context->comment->commenter->name ?>
|
|
</a>
|
|
<?php else: ?>
|
|
<?php echo Model_User::getAnonymousName() ?>
|
|
<?php endif ?>
|
|
</span>
|
|
|
|
<span class="date">
|
|
<?php echo date('Y-m-d H:i', $this->context->comment->comment_date) ?>
|
|
</span>
|
|
|
|
<?php if (PrivilegesHelper::confirm(Privilege::DeleteComment, PrivilegesHelper::getIdentitySubPrivilege($this->context->comment->commenter))): ?>
|
|
<span class="delete">
|
|
<a class="simple-action confirmable" href="<?php echo \Chibi\UrlHelper::route('comment', 'delete', ['id' => $this->context->comment->id]) ?>" data-confirm-text="Are you sure you want to delete this comment?">
|
|
delete
|
|
</a>
|
|
</span>
|
|
<?php endif ?>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<?php echo $this->context->comment->getText() ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
</div>
|