mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 01:43:45 +08:00
151 lines
4.6 KiB
Handlebars
151 lines
4.6 KiB
Handlebars
<div class='flagged-post-details'>
|
|
<div class="flagged-post-avatar">
|
|
{{#if flaggedPost.postAuthorFlagged}}
|
|
{{#if flaggedPost.user}}
|
|
{{#link-to 'adminUser' flaggedPost.user.id flaggedPost.user.username}}
|
|
{{avatar flaggedPost.user imageSize="large"}}
|
|
{{/link-to}}
|
|
{{#if flaggedPost.wasEdited}}
|
|
{{d-icon "pencil" title="admin.flags.was_edited"}}
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/if}}
|
|
{{#if canAct}}
|
|
{{#if flaggedPost.previous_flags_count}}
|
|
<span title="{{i18n 'admin.flags.previous_flags_count' count=flaggedPost.previous_flags_count}}" class="badge-notification previous-flagged-posts">{{flaggedPost.previous_flags_count}}</span>
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
|
|
<div class="flagged-post-excerpt">
|
|
{{#unless hideTitle}}
|
|
<h3>
|
|
{{#if flaggedPost.topic.isPrivateMessage}}
|
|
<span class="private-message-glyph">{{d-icon "envelope"}}</span>
|
|
{{/if}}
|
|
{{topic-status topic=flaggedPost.topic}}
|
|
<a href='{{unbound flaggedPost.url}}'>{{{unbound flaggedPost.topic.fancyTitle}}}</a>
|
|
</h3>
|
|
{{/unless}}
|
|
{{#if flaggedPost.postAuthorFlagged}}
|
|
<p>{{{flaggedPost.excerpt}}}</p>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<div class='flaggers'>
|
|
{{#if site.mobileView}}
|
|
<div class='flaggers-title'>
|
|
{{i18n 'admin.flags.flagged_by'}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#each flaggedPost.post_actions as |postAction|}}
|
|
<div class='flagger'>
|
|
{{#link-to 'adminUser' postAction.user.id postAction.user.username class='flagger-avatar'}}
|
|
{{avatar postAction.user imageSize="medium"}}
|
|
{{/link-to}}
|
|
<div class='flagger-details'>
|
|
<div class='flagger-username'>
|
|
{{#link-to 'adminUser' postAction.user.id postAction.user.username}}
|
|
{{postAction.user.username}}
|
|
{{/link-to}}
|
|
</div>
|
|
<div class='flagger-flagged-at'>
|
|
{{format-age postAction.created_at}}
|
|
</div>
|
|
<div class='flagger-flag-type'>
|
|
{{i18n (concat "admin.flags.summary.action_type_" postAction.post_action_type_id) count=1}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
|
|
{{#if showResolvedBy}}
|
|
<div class='flagged-post-resolved-by'>
|
|
{{#each flaggedPost.post_actions as |postAction|}}
|
|
<div class='disposer'>
|
|
{{#link-to
|
|
'adminUser'
|
|
postAction.disposed_by.id
|
|
postAction.disposed_by.username
|
|
class="disposer-avatar"}}
|
|
{{avatar postAction.disposed_by imageSize="medium"}}
|
|
{{/link-to}}
|
|
<div class='disposer-details'>
|
|
{{format-age postAction.disposed_at}}
|
|
{{disposition-icon postAction.disposition}}
|
|
{{#if postAction.staff_took_action}}
|
|
{{d-icon "gavel" title="admin.flags.took_action"}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
|
|
{{#if flaggedPost.topicFlagged}}
|
|
<div class='flagged-post-message'>
|
|
<span class='text'>{{{i18n 'admin.flags.topic_flagged'}}}</span>
|
|
<a href={{flaggedPost.url}} class="btn">{{i18n 'admin.flags.visit_topic'}}</a>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#each flaggedPost.conversations as |c|}}
|
|
<div class='flagged-post-message'>
|
|
{{#if c.response}}
|
|
{{flagged-post-response response=c.response}}
|
|
{{#if c.reply}}
|
|
{{flagged-post-response response=c.reply hasMore=c.hasMore permalink=c.permalink}}
|
|
{{/if}}
|
|
<a href={{c.permalink}} class="btn btn-reply">
|
|
{{d-icon "reply"}}
|
|
{{i18n "admin.flags.reply_message"}}
|
|
</a>
|
|
{{/if}}
|
|
</div>
|
|
{{/each}}
|
|
|
|
{{#if canAct}}
|
|
<div class='flagged-post-controls'>
|
|
{{d-button
|
|
title="admin.flags.agree_title"
|
|
class="agree-flag"
|
|
label="admin.flags.agree"
|
|
icon="thumbs-o-up"
|
|
action="showAgreeFlagModal"
|
|
ellipsis=true}}
|
|
|
|
{{#if flaggedPost.postHidden}}
|
|
{{d-button
|
|
title="admin.flags.disagree_flag_unhide_post_title"
|
|
class="disagree-flag"
|
|
action="disagree"
|
|
icon="thumbs-o-down"
|
|
label="admin.flags.disagree_flag_unhide_post"}}
|
|
{{else}}
|
|
{{d-button
|
|
title="admin.flags.disagree_flag_title"
|
|
class="disagree-flag"
|
|
action="disagree"
|
|
icon="thumbs-o-down"
|
|
label="admin.flags.disagree_flag"}}
|
|
{{/if}}
|
|
|
|
{{d-button
|
|
class="defer-flag"
|
|
title="admin.flags.defer_flag_title"
|
|
action="defer"
|
|
icon="external-link"
|
|
label="admin.flags.defer_flag"}}
|
|
|
|
{{d-button
|
|
class="btn-danger delete-flag"
|
|
title="admin.flags.delete_title"
|
|
action="showDeleteFlagModal"
|
|
icon="trash-o"
|
|
label="admin.flags.delete"}}
|
|
</div>
|
|
{{/if}}
|