Merge branch '5.3'
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / commentResponseList.tpl
1 {foreach from=$responseList item=response}
2 {if $response->isDisabled && !$commentCanModerate}
3 <li>
4 <p class="info commentModerationDisabledComment">{lang}wcf.comment.moderation.disabledComment{/lang}</p>
5 </li>
6 {else}
7 <li class="commentResponse jsCommentResponse" data-response-id="{@$response->responseID}" {@$__wcf->getReactionHandler()->getDataAttributes('com.woltlab.wcf.comment.response', $response->responseID)} data-can-edit="{if $response->isEditable()}true{else}false{/if}" data-can-delete="{if $response->isDeletable()}true{else}false{/if}" data-user-id="{@$response->userID}">
8 <div class="box32{if $__wcf->getUserProfileHandler()->isIgnoredUser($response->userID)} ignoredUserContent{/if}">
9 {user object=$response->getUserProfile() type='avatar32' ariaHidden='true' tabindex='-1'}
10
11 <div class="commentContent commentResponseContent" itemprop="comment" itemscope itemtype="http://schema.org/Comment">
12 <meta itemprop="dateCreated" content="{@$response->time|date:'c'}">
13
14 <div class="containerHeadline">
15 <h3 itemprop="author" itemscope itemtype="http://schema.org/Person">
16 {if $response->userID}
17 <a href="{$response->getUserProfile()->getLink()}" class="userLink" data-object-id="{@$response->userID}" itemprop="url">
18 <span itemprop="name">{@$response->getUserProfile()->getFormattedUsername()}</span>
19 </a>
20 {else}
21 <span itemprop="name">{$response->username}</span>
22 {/if}
23
24 <small class="separatorLeft">{@$response->time|time}</small>
25
26 {if $response->isDisabled}
27 <span class="badge label green jsIconDisabled">{lang}wcf.message.status.disabled{/lang}</span>
28 {/if}
29
30 {if $commentManager->isContentAuthor($response)}
31 <span class="badge label">{lang}wcf.comment.objectAuthor{/lang}</span>
32 {/if}
33 </h3>
34 </div>
35
36 <div class="htmlContent userMessage" itemprop="text">{@$response->getFormattedMessage()}</div>
37
38 {if MODULE_LIKE && $commentManager->supportsLike() && $likeData|isset}{include file="reactionSummaryList" isTiny=true reactionData=$likeData[response] objectType="com.woltlab.wcf.comment.response" objectID=$response->responseID}{else}<a href="#" class="reactionSummaryList reactionSummaryListTiny jsOnly" data-object-type="com.woltlab.wcf.comment.response" data-object-id="{$response->responseID}" title="{lang}wcf.reactions.summary.listReactions{/lang}" style="display: none;"></a>{/if}
39
40 <nav class="jsMobileNavigation buttonGroupNavigation">
41 <ul class="buttonList iconList">
42 {if $response->isDisabled && $commentCanModerate}
43 <li class="jsOnly"><a href="#" class="jsEnableResponse"><span class="icon icon16 fa-check"></span> <span class="invisible">{lang}wcf.comment.approve{/lang}</span></a></li>
44 {/if}
45 {if $commentManager->supportsReport() && $__wcf->session->getPermission('user.profile.canReportContent')}
46 <li class="jsReportCommentResponse jsOnly" data-object-id="{@$response->responseID}"><a href="#" title="{lang}wcf.moderation.report.reportContent{/lang}" class="jsTooltip"><span class="icon icon16 fa-exclamation-triangle"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>
47 {/if}
48
49 {if MODULE_LIKE && $commentManager->supportsLike() && $__wcf->session->getPermission('user.like.canLike') && $response->userID != $__wcf->user->userID}<li class="jsOnly"><a href="#" class="reactButton jsTooltip {if $likeData[response][$response->responseID]|isset && $likeData[response][$response->responseID]->reactionTypeID} active{/if}" title="{lang}wcf.reactions.react{/lang}" data-reaction-type-id="{if $likeData[response][$response->responseID]|isset && $likeData[response][$response->responseID]->reactionTypeID}{$likeData[response][$response->responseID]->reactionTypeID}{else}0{/if}"><span class="icon icon16 fa-smile-o"></span> <span class="invisible">{lang}wcf.reactions.react{/lang}</span></a></li>{/if}
50
51 {event name='commentOptions'}
52 </ul>
53 </nav>
54 </div>
55 </div>
56 </li>
57 {/if}
58 {/foreach}