Add the new variable `FileProcessorFormField::$bigPreview` with getter and setter.
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / commentList.tpl
1 {if !$commentManager|isset}{assign var='commentManager' value=$commentList->getCommentManager()}{/if}
2 {if !$commentCanAdd|isset}{assign var=commentCanAdd value=$commentManager->canAdd($commentList->objectID)}{/if}
3 {if !$commentCanModerate|isset}{assign var=commentCanModerate value=$commentManager->canModerate($commentList->objectTypeID, $commentList->objectID)}{/if}
4 {foreach from=$commentList item=comment}
5 {if $comment->isDisabled && !$commentCanModerate}
6 <div class="commentList__item">
7 <p class="info commentModerationDisabledComment">{lang}wcf.comment.moderation.disabledComment{/lang}</p>
8 </div>
9 {else}
10 <div class="commentList__item jsComment{if $__wcf->getUserProfileHandler()->isIgnoredUser($comment->userID, 2)} ignoredUserContent{/if}"
11 data-comment-id="{@$comment->commentID}"
12 {@$__wcf->getReactionHandler()->getDataAttributes('com.woltlab.wcf.comment', $comment->commentID)}
13 data-can-edit="{if $comment->isEditable()}true{else}false{/if}" data-can-delete="{if $comment->isDeletable()}true{else}false{/if}"
14 data-responses="{@$comment->responses}" data-last-response-time="{if $ignoreLastResponseTime|empty}{@$comment->getLastResponseTime()}{else}1{/if}" data-is-disabled="{@$comment->isDisabled}"
15 data-last-response-id="{if $ignoreLastResponseTime|empty}{@$comment->getLastResponseID()}{else}0{/if}"
16 >
17 <woltlab-core-comment class="comment" comment-id="{@$comment->commentID}" itemprop="comment" itemscope itemtype="http://schema.org/Comment">
18 <div class="comment__header">
19 <div class="comment__avatar">
20 {user object=$comment->getUserProfile() type='avatar32' ariaHidden='true' tabindex='-1'}
21 </div>
22 <div class="comment__author" itemprop="author" itemscope itemtype="http://schema.org/Person">
23 {if $comment->userID}
24 <a href="{$comment->getUserProfile()->getLink()}" class="comment__author__link userLink" data-object-id="{@$comment->userID}" itemprop="url">
25 <span itemprop="name">{@$comment->getUserProfile()->getFormattedUsername()}</span>
26 </a>
27 {else}
28 <span itemprop="name">{$comment->username}</span>
29 {/if}
30 </div>
31 <div class="comment__date">
32 <meta itemprop="datePublished" content="{@$comment->time|date:'c'}">
33 <a href="{$comment->getLink()}" class="comment__permalink">{@$comment->time|time}</a>
34 </div>
35 <div class="comment__status">
36 {if $comment->isDisabled}
37 <span class="badge label green comment__status--disabled">{lang}wcf.message.status.disabled{/lang}</span>
38 {/if}
39
40 {if $commentManager->isContentAuthor($comment)}
41 <span class="badge label">{lang}wcf.comment.objectAuthor{/lang}</span>
42 {/if}
43
44 {event name='commentStatus'}
45 </div>
46 {hascontent}
47 <div class="comment__menu dropdown" id="commentOptions{@$comment->commentID}">
48 <button type="button" class="dropdownToggle" aria-label="{lang}wcf.global.button.more{/lang}">{icon name='ellipsis-vertical'}</button>
49
50 <ul class="dropdownMenu">
51 {content}
52 {if $comment->isDisabled && $commentCanModerate}
53 <li>
54 <a href="#" class="comment__option comment__option--enable">
55 {lang}wcf.comment.approve{/lang}
56 </a>
57 </li>
58 {/if}
59 {if $commentManager->supportsReport() && $__wcf->session->getPermission('user.profile.canReportContent')}
60 <li>
61 <a
62 href="#"
63 data-report-content="com.woltlab.wcf.comment.comment"
64 data-object-id="{$comment->commentID}"
65 class="comment__option comment__option--report"
66 >
67 {lang}wcf.moderation.report.reportContent{/lang}
68 </a>
69 </li>
70 {/if}
71 {if $comment->isEditable()}
72 <li>
73 <a href="#" class="comment__option comment__option--edit">
74 {lang}wcf.global.button.edit{/lang}
75 </a>
76 </li>
77 {/if}
78 {if $comment->isDeletable()}
79 <li>
80 <a href="#" class="comment__option comment__option--delete">
81 {lang}wcf.global.button.delete{/lang}
82 </a>
83 </li>
84 {/if}
85
86 {event name='commentMenuOptions'}
87 {/content}
88 </ul>
89 </div>
90 {/hascontent}
91
92 {event name='commentHeader'}
93 </div>
94
95 {event name='commentBeforeMessage'}
96
97 <div class="comment__message">
98 <div class="htmlContent userMessage" itemprop="text">{@$comment->getFormattedMessage()}</div>
99 </div>
100
101 {event name='commentAfterMessage'}
102
103 <div class="comment__footer">
104 <div class="comment__reactions">
105 {if MODULE_LIKE && $commentManager->supportsLike() && $likeData|isset}
106 {include file="reactionSummaryList" isTiny=true reactionData=$likeData[comment] objectType="com.woltlab.wcf.comment" objectID=$comment->commentID}
107 {else}
108 <a href="#" class="reactionSummaryList reactionSummaryListTiny" data-object-type="com.woltlab.wcf.comment" data-object-id="{$comment->commentID}" title="{lang}wcf.reactions.summary.listReactions{/lang}" style="display: none;"></a>
109 {/if}
110 </div>
111
112 <div class="comment__buttons">
113 {if $commentCanAdd}
114 <button
115 type="button"
116 class="comment__button comment__button--reply button small"
117 >
118 <span>{lang}wcf.comment.button.response.add{/lang}</span>
119 </button>
120 {/if}
121
122 {if MODULE_LIKE && $commentManager->supportsLike() && $__wcf->session->getPermission('user.like.canLike') && $comment->userID != $__wcf->user->userID}
123 <button
124 type="button"
125 class="comment__button comment__button--react jsTooltip button small {if $likeData[comment][$comment->commentID]|isset && $likeData[comment][$comment->commentID]->reactionTypeID} active{/if}"
126 title="{lang}wcf.reactions.react{/lang}"
127 data-reaction-type-id="{if $likeData[comment][$comment->commentID]|isset && $likeData[comment][$comment->commentID]->reactionTypeID}{$likeData[comment][$comment->commentID]->reactionTypeID}{else}0{/if}"
128 >
129 {icon name='face-smile'}
130 <span class="invisible">{lang}wcf.reactions.react{/lang}</span>
131 </button>
132 {/if}
133
134 {event name='commentButtons'}
135 </div>
136
137 {event name='commentFooter'}
138 </div>
139 </woltlab-core-comment>
140
141 {if !$ignoreLastResponseTime|empty || $comment|count}
142 <div class="comment__responses">
143 <div class="commentResponseList" data-responses="{if $commentCanModerate}{@$comment->unfilteredResponses}{else}{@$comment->responses}{/if}">
144 {if $ignoreLastResponseTime|empty}{include file='commentResponseList' responseList=$comment}{/if}
145 </div>
146 </div>
147 {/if}
148 </div>
149 {/if}
150 {/foreach}