5607cfc353
Pages load 1.5-2x faster Exception trace in JSON is now represented as an array Fixed pagination of default favorites page in user pages Fixed thumbnail size validation for non-square thumbnails
44 lines
1.5 KiB
PHTML
44 lines
1.5 KiB
PHTML
<div class="comment">
|
|
<div class="avatar">
|
|
<?php $commenter = $this->context->comment->getCommenter() ?>
|
|
<?php if ($commenter): ?>
|
|
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $commenter->name]) ?>">
|
|
<img src="<?php echo htmlspecialchars($commenter->getAvatarUrl(40)) ?>" alt="<?php echo $commenter->name ?>"/>
|
|
</a>
|
|
<?php else: ?>
|
|
<img src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="<?php echo UserModel::getAnonymousName() ?>">
|
|
<?php endif ?>
|
|
</div>
|
|
|
|
<div class="body">
|
|
<div class="header">
|
|
<span class="nickname">
|
|
<?php if ($commenter): ?>
|
|
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $commenter->name]) ?>">
|
|
<?php echo $commenter->name ?>
|
|
</a>
|
|
<?php else: ?>
|
|
<?php echo UserModel::getAnonymousName() ?>
|
|
<?php endif ?>
|
|
</span>
|
|
|
|
<span class="date">
|
|
<?php echo date('Y-m-d H:i', $this->context->comment->commentDate) ?>
|
|
</span>
|
|
|
|
<?php if (PrivilegesHelper::confirm(Privilege::DeleteComment, PrivilegesHelper::getIdentitySubPrivilege($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>
|