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

87 lines
3.3 KiB
Handlebars
Raw Normal View History

2013-02-05 14:16:51 -05:00
<div class='admin-controls'>
<div class='span15'>
<ul class="nav nav-pills">
<li>{{#linkTo adminFlags.active}}{{i18n admin.flags.active}}{{/linkTo}}</li>
<li>{{#linkTo adminFlags.old}}{{i18n admin.flags.old}}{{/linkTo}}</li>
</ul>
</div>
2013-02-05 14:16:51 -05:00
</div>
{{#if model.loading}}
<div class='admin-loading'>{{i18n loading}}</div>
{{else}}
{{#if model.length}}
<table class='admin-flags'>
<thead>
2013-02-05 14:16:51 -05:00
<tr>
<th class='user'></th>
<th class='excerpt'></th>
<th class='flaggers'>{{i18n admin.flags.flagged_by}}</th>
<th class='last-flagged'></th>
<th class='action'></th>
</tr>
</thead>
<tbody>
{{#each flag in content}}
<tr {{bindAttr class="flag.extraClasses"}}>
2013-06-21 03:12:17 -04:00
<td class='user'>{{#if flag.user}}{{#linkTo 'adminUser' flag.user}}{{avatar flag.user imageSize="small"}}{{/linkTo}}{{/if}}</td>
2013-06-21 03:12:17 -04:00
<td class='excerpt'>{{#if flag.topicHidden}}<i title='{{i18n topic_statuses.invisible.help}}' class='icon icon-eye-close'></i> {{/if}}<h3><a href='{{unbound flag.url}}'>{{flag.title}}</a></h3><br>{{{flag.excerpt}}}
</td>
2013-06-21 03:12:17 -04:00
<td class='flaggers'>
<table>
{{#each flag.flaggers}}
<tr>
<td>
{{#linkTo 'adminUser' this.user}}{{avatar this.user imageSize="small"}} {{/linkTo}}
</td>
<td>
{{date this.flaggedAt}}
</td>
<td>
{{this.flagType}}
</td>
</tr>
{{/each}}
</table>
2013-06-17 03:15:56 -04:00
</td>
2013-06-21 03:12:17 -04:00
2013-02-05 14:16:51 -05:00
</tr>
{{#each flag.messages}}
<tr>
<td></td>
<td class='message'>
2013-06-27 19:01:48 -04:00
<div>{{#linkTo 'adminUser' user}}{{avatar user imageSize="small"}}{{/linkTo}} {{message}} <a href="{{unbound permalink}}"><button class='btn'><i class="icon-reply"></i> {{i18n admin.flags.view_message}}</button></a></div>
</td>
<td></td>
<td></td>
</tr>
{{/each}}
2013-06-21 03:29:54 -04:00
<tr>
<td colspan="4" class="action">
{{#if adminActiveFlagsView}}
{{#if flag.postHidden}}
<button title='{{i18n admin.flags.disagree_unhide_title}}' class='btn' {{action disagreeFlags flag}}><i class="icon-thumbs-down"></i> {{i18n admin.flags.disagree_unhide}}</button>
<button title='{{i18n admin.flags.defer_title}}' class='btn' {{action deferFlags flag}}><i class="icon-external-link"></i> {{i18n admin.flags.defer}}</button>
{{else}}
<button title='{{i18n admin.flags.agree_hide_title}}' class='btn' {{action agreeFlags flag}}><i class="icon-thumbs-up"></i> {{i18n admin.flags.agree_hide}}</button>
<button title='{{i18n admin.flags.disagree_title}}' class='btn' {{action disagreeFlags flag}}><i class="icon-thumbs-down"></i> {{i18n admin.flags.disagree}}</button>
{{/if}}
<button title='{{i18n admin.flags.delete_post_title}}' class='btn' {{action deletePost flag}}><i class="icon-trash"></i> {{i18n admin.flags.delete_post}}</button>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{else}}
<p>{{i18n admin.flags.no_results}}</p>
{{/if}}
2013-06-17 03:15:56 -04:00
{{/if}}