discourse/app/assets/javascripts/admin/templates/components/flagged-post.hbs
Joffrey JAFFEUX f9648de897
DEV: upgrades from Ember 2.13 to Ember 3.5.1 (#6808)
Co-Authored-By: Bianca Nenciu <nbianca@users.noreply.github.com>
Co-Authored-By: David Taylor <david@taylorhq.com>
2019-01-10 11:06:01 +01:00

117 lines
3.9 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}}
<div class='edited-after'>
{{d-icon "pencil" title="admin.flags.was_edited"}}
</div>
{{/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-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>
{{/if}}
{{/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='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}}
</div>
{{/each}}
{{flag-user-lists flaggedPost=flaggedPost showResolvedBy=showResolvedBy}}
<div class='flagged-post-controls'>
{{#if canAct}}
{{admin-agree-flag-dropdown
post=flaggedPost
removeAfter=(action "removeAfter") }}
{{#if flaggedPost.postHidden}}
{{d-button
title="admin.flags.disagree_flag_unhide_post_title"
class="btn-default disagree-flag"
action=(action "disagree")
icon="thumbs-o-down"
label="admin.flags.disagree_flag_unhide_post"}}
{{else}}
{{d-button
title="admin.flags.disagree_flag_title"
class="btn-default disagree-flag"
action=(action "disagree")
icon="thumbs-o-down"
label="admin.flags.disagree_flag"}}
{{/if}}
{{d-button
class="btn-default defer-flag"
title="admin.flags.ignore_flag_title"
action=(action "defer")
icon="external-link"
label="admin.flags.ignore_flag"}}
{{admin-delete-flag-dropdown
post=flaggedPost
removeAfter=(action "removeAfter")}}
{{/if}}
{{d-button
class="btn-default"
icon="list"
label="admin.flags.moderation_history"
action=(action "showModerationHistory")}}
</div>
{{plugin-outlet
name="flagged-post-below-controls"
tagName=""
args=(hash flaggedPost=flaggedPost canAct=canAct actableFilter=actableFilter)}}
</div>
</div>