discourse/app/assets/javascripts/admin/templates/flags.js.handlebars

167 lines
6.6 KiB
Handlebars
Raw Normal View History

2013-02-06 03:16:51 +08:00
<div class='admin-controls'>
<div class='span15'>
<ul class="nav nav-pills">
2013-09-17 02:08:55 +08:00
<li>{{#link-to 'adminFlags.active'}}{{i18n admin.flags.active}}{{/link-to}}</li>
<li>{{#link-to 'adminFlags.old'}}{{i18n admin.flags.old}}{{/link-to}}</li>
2013-02-06 03:16:51 +08:00
</ul>
</div>
2013-02-06 03:16:51 +08:00
</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}}
2014-02-06 06:54:16 +08:00
{{/if}}
</td>
2013-06-21 15:12:17 +08:00
<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.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="40%">
{{#link-to 'adminUser' user}}
{{user.username}}
{{/link-to}}
<br />
{{date flaggedAt}}
</td>
<td width="40%">
{{flagType}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</td>
2013-06-21 15:12:17 +08:00
<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="40%">
{{date disposedAt}}
</td>
<td width="40%">
{{{dispositionIcon}}}
{{#if tookAction}}
<i class='fa fa-gavel' title='{{i18n admin.flags.took_action}}'></i>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</td>
</tr>
2013-06-21 15:12:17 +08:00
2014-02-06 06:54:16 +08:00
{{#if flaggedPost.topicFlagged}}
<tr class='message'>
2014-02-06 06:54:16 +08:00
<td></td>
<td colspan="3">
<div>
{{{i18n admin.flags.topic_flagged}}}&nbsp;<a href='{{unbound flaggedPost.url}}' class="btn">{{i18n admin.flags.visit_topic}}</a>
</div>
</td>
2014-02-06 06:54:16 +08:00
</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}}&nbsp;{{{response.excerpt}}}
</p>
{{#if reply}}
<p>
{{#link-to 'adminUser' reply.user}}{{avatar reply.user imageSize="small"}}{{/link-to}}&nbsp;{{{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>&nbsp;{{i18n admin.flags.reply_message}}</button>
</a>
{{/if}}
</div>
</td>
</tr>
{{/each}}
2013-06-21 15:12:17 +08:00
<tr>
<td colspan="4" class="action">
{{#if adminActiveFlagsView}}
<button title='{{i18n admin.flags.agree_title}}' class='btn' {{action showAgreeFlagModal flaggedPost}}><i class="fa fa-thumbs-o-up"></i>{{i18n admin.flags.agree}}&hellip;</button>
{{#if flaggedPost.postHidden}}
2014-08-05 04:48:04 +08:00
<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}}
2014-08-05 04:48:04 +08:00
<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>
2014-02-06 06:54:16 +08:00
{{/if}}
2014-08-05 04:48:04 +08:00
<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}}&hellip;</button>
2014-02-06 06:54:16 +08:00
{{/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>