mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 10:08:20 -05:00
bddffa7f9a
All flags should end up in one of the three dispositions - Agree - Disagree - Defer In the administration area, the *active* flags section displays 4 buttons - Agree (hide post + send PM) - Disagree - Defer - Delete Clicking "Delete" will open a modal that offer to - Delete Post & Defer Flags - Delete Post & Agree with Flags - Delete Spammer (if available) When the flag has a list associated, the list will now display 1 response and 1 reply and a "show more..." link if there are more in the conversation. Replying to the conversation will NOT give a disposition. Moderators must click the buttons that does that. If someone clicks one buttons, this will add a default moderator message from that moderator saying what happened. The *old* flags section now displays the proper dispositions and is super duper fast (no more N+9999 queries). FIX: the old list includes deleted topics FIX: the lists now properly display the topic states (deleted, closed, archived, hidden, PM) FIX: flagging a topic that you've already flagged the first post
170 lines
6.8 KiB
Handlebars
170 lines
6.8 KiB
Handlebars
<div class='admin-controls'>
|
|
<div class='span15'>
|
|
<ul class="nav nav-pills">
|
|
<li>{{#link-to 'adminFlags.active'}}{{i18n admin.flags.active}}{{/link-to}}</li>
|
|
<li>{{#link-to 'adminFlags.old'}}{{i18n admin.flags.old}}{{/link-to}}</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="admin-container">
|
|
{{#if loading}}
|
|
<div class='admin-loading'>{{i18n loading}}</div>
|
|
{{else}}
|
|
{{#if length}}
|
|
<table class='admin-flags'>
|
|
<thead>
|
|
<tr>
|
|
<th class='user'></th>
|
|
<th class='excerpt'></th>
|
|
<th class='flaggers'>{{i18n admin.flags.flagged_by}}</th>
|
|
<th class='flaggers'>{{#if adminOldFlagsView}}{{i18n admin.flags.resolved_by}}{{/if}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#each flaggedPost in content}}
|
|
<tr {{bind-attr class="flaggedPost.extraClasses"}}>
|
|
|
|
<td class='user'>
|
|
{{#if flaggedPost.postAuthorFlagged}}
|
|
{{#if flaggedPost.user}}
|
|
{{#link-to 'adminUser' flaggedPost.user}}{{avatar flaggedPost.user imageSize="small"}}{{/link-to}}
|
|
{{/if}}
|
|
{{/if}}
|
|
</td>
|
|
|
|
<td class='excerpt'>
|
|
<h3>
|
|
{{#if flaggedPost.topic.isPrivateMessage}}
|
|
<span class="private-message-glyph">{{icon envelope}}</span>
|
|
{{/if}}
|
|
{{topic-status topic=flaggedPost.topic}}
|
|
<a href='{{unbound flaggedPost.topic.url}}'>{{flaggedPost.topic.title}}</a>
|
|
</h3>
|
|
{{#if flaggedPost.postAuthorFlagged}}
|
|
{{{flaggedPost.excerpt}}}
|
|
{{/if}}
|
|
</td>
|
|
|
|
<td class='flaggers'>
|
|
<table>
|
|
<tbody>
|
|
{{#each flaggedPost.flaggers}}
|
|
<tr>
|
|
<td width="20%">
|
|
{{#link-to 'adminUser' user}}
|
|
{{avatar user imageSize="small"}}
|
|
{{/link-to}}
|
|
</td>
|
|
<td width="30%">
|
|
{{date flaggedAt}}
|
|
</td>
|
|
<td width="50%">
|
|
{{flagType}}
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
|
|
<td class='flaggers result'>
|
|
<table>
|
|
<tbody>
|
|
{{#each flaggedPost.flaggers}}
|
|
<tr>
|
|
<td width="20%">
|
|
{{#link-to 'adminUser' disposedBy}}
|
|
{{avatar disposedBy imageSize="small"}}
|
|
{{/link-to}}
|
|
</td>
|
|
<td width="30%">
|
|
{{date disposedAt}}
|
|
</td>
|
|
<td width="50%">
|
|
{{disposition}}
|
|
{{#if tookAction}}
|
|
<i class='fa fa-gavel'></i>
|
|
{{/if}}
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{#if flaggedPost.topicFlagged}}
|
|
<tr class='message'>
|
|
<td></td>
|
|
<td colspan="3">
|
|
<div>
|
|
{{{i18n admin.flags.topic_flagged}}}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{{/if}}
|
|
|
|
{{#each flaggedPost.conversations}}
|
|
<tr class='message'>
|
|
<td></td>
|
|
<td colspan="3">
|
|
<div>
|
|
{{#if response}}
|
|
<p>
|
|
{{#link-to 'adminUser' response.user}}{{avatar response.user imageSize="small"}}{{/link-to}} {{{response.excerpt}}}
|
|
</p>
|
|
{{#if reply}}
|
|
<p>
|
|
{{#link-to 'adminUser' reply.user}}{{avatar reply.user imageSize="small"}}{{/link-to}} {{{reply.excerpt}}}
|
|
{{#if hasMore}}
|
|
<a href="{{unbound permalink}}">{{i18n admin.flags.more}}</a>
|
|
{{/if}}
|
|
</p>
|
|
{{/if}}
|
|
<a href="{{unbound permalink}}">
|
|
<button class='btn btn-reply'><i class="fa fa-reply"></i> {{i18n admin.flags.reply_message}}</button>
|
|
</a>
|
|
{{/if}}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
|
|
<tr>
|
|
<td colspan="4" class="action">
|
|
{{#if adminActiveFlagsView}}
|
|
{{#if flaggedPost.topicFlagged}}
|
|
<a href='{{unbound flaggedPost.url}}' class="btn">{{i18n admin.flags.visit_topic}}</a>
|
|
{{/if}}
|
|
|
|
{{#if flaggedPost.postAuthorFlagged}}
|
|
{{#if flaggedPost.postHidden}}
|
|
<button title='{{i18n admin.flags.disagree_flag_unhide_post_title}}' class='btn' {{action disagreeFlags flaggedPost}}><i class="fa fa-thumbs-o-down"></i> {{i18n admin.flags.disagree_flag_unhide_post}}</button>
|
|
{{else}}
|
|
<button title='{{i18n admin.flags.agree_flag_hide_post_title}}' class='btn btn-primary' {{action agreeFlags flaggedPost}}><i class="fa fa-thumbs-o-up"></i> {{i18n admin.flags.agree_flag_hide_post}}</button>
|
|
<button title='{{i18n admin.flags.disagree_flag_title}}' class='btn' {{action disagreeFlags flaggedPost}}><i class="fa fa-thumbs-o-down"></i> {{i18n admin.flags.disagree_flag}}</button>
|
|
{{/if}}
|
|
<button title='{{i18n admin.flags.defer_flag_title}}' class='btn' {{action deferFlags flaggedPost}}><i class="fa fa-external-link"></i> {{i18n admin.flags.defer_flag}}</button>
|
|
<button title='{{i18n admin.flags.delete_title}}' class='btn btn-danger' {{action showDeleteFlagModal flaggedPost}}><i class="fa fa-trash-o"></i> {{i18n admin.flags.delete}}</button>
|
|
{{else}}
|
|
<button title='{{i18n admin.flags.clear_topic_flags_title}}' class='btn' {{action doneTopicFlags flaggedPost}}>{{i18n admin.flags.clear_topic_flags}}</button>
|
|
{{/if}}
|
|
{{/if}}
|
|
</td>
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</tbody>
|
|
</table>
|
|
{{#if view.loading}}
|
|
<div class='admin-loading'>{{i18n loading}}</div>
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
<p>{{i18n admin.flags.no_results}}</p>
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|