discourse/app/assets/javascripts/admin/templates/components/flagged-post.hbs

116 lines
3.8 KiB
Handlebars
Raw Normal View History

2017-09-12 02:01:59 +08:00
<div class='flagged-post-details'>
<div class="flagged-post-avatar">
{{#if flaggedPost.postAuthorFlagged}}
{{#if flaggedPost.user}}
2017-09-12 04:44:20 +08:00
{{#link-to 'adminUser' flaggedPost.user.id flaggedPost.user.username}}
{{avatar flaggedPost.user imageSize="large"}}
{{/link-to}}
2017-09-12 02:01:59 +08:00
{{#if flaggedPost.wasEdited}}
2017-09-26 04:29:48 +08:00
<div class='edited-after'>
{{d-icon "pencil" title="admin.flags.was_edited"}}
</div>
2017-09-09 04:27:07 +08:00
{{/if}}
{{/if}}
{{/if}}
2017-09-12 02:01:59 +08:00
{{#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>
2017-09-09 04:27:07 +08:00
<div class="flagged-post-contents">
<div class='flagged-post-user-details'>
<a class='username' href={{user.path}} data-user-card={{flaggedPost.user.username}}>{{format-username flaggedPost.user.username}}</a>
{{plugin-outlet
name="flagged-post-controls"
tagName=""
args=(hash flaggedPost=flaggedPost actableFilter=actableFilter topic=topic)}}
</div>
<div class='flagged-post-excerpt'>
{{#unless hideTitle}}
{{flagged-post-title flaggedPost=flaggedPost}}
{{/unless}}
{{#if flaggedPost.postAuthorFlagged}}
{{#if expanded}}
{{{flaggedPost.cooked}}}
{{else}}
<p>
{{{flaggedPost.excerpt}}}
<a href {{action "expand"}}>{{i18n "admin.flags.show_full"}}</a>
</p>
2017-09-12 02:01:59 +08:00
{{/if}}
{{/if}}
</div>
2017-09-09 04:27:07 +08:00
{{#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>
2017-09-12 02:01:59 +08:00
</div>
2017-09-09 04:27:07 +08:00
{{/if}}
{{#each flaggedPost.conversations as |c|}}
<div class='flag-conversation'>
{{#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 reply-conversation btn-small">
{{d-icon "reply"}}
{{i18n "admin.flags.reply_message"}}
</a>
{{/if}}
2017-09-12 02:01:59 +08:00
</div>
{{/each}}
{{flag-user-lists flaggedPost=flaggedPost showResolvedBy=showResolvedBy}}
2017-09-09 04:27:07 +08:00
<div class='flagged-post-controls'>
{{#if canAct}}
2017-11-11 04:55:48 +08:00
{{admin-agree-flag-dropdown
post=flaggedPost
removeAfter=(action "removeAfter") }}
2017-09-09 04:27:07 +08:00
{{#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}}
2017-09-09 04:27:07 +08:00
{{d-button
class="defer-flag"
title="admin.flags.ignore_flag_title"
action="defer"
icon="external-link"
label="admin.flags.ignore_flag"}}
2017-09-09 04:27:07 +08:00
{{admin-delete-flag-dropdown
post=flaggedPost
removeAfter=(action "removeAfter")}}
{{/if}}
{{d-button
icon="list"
label="admin.flags.moderation_history"
action=(action "showModerationHistory")}}
</div>
{{plugin-outlet
name="flagged-post-below-controls"
tagName=""
2018-01-13 05:08:40 +08:00
args=(hash flaggedPost=flaggedPost canAct=canAct actableFilter=actableFilter)}}
2017-09-12 02:01:59 +08:00
</div>
</div>