FEATURE: New 'Reviewable' model to make reviewable items generic

Includes support for flags, reviewable users and queued posts, with REST API
backwards compatibility.

Co-Authored-By: romanrizzi <romanalejandro@gmail.com>
Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
This commit is contained in:
Robin Ward
2019-01-03 12:03:01 -05:00
parent 9a56b398a1
commit b58867b6e9
354 changed files with 8090 additions and 5225 deletions

View File

@@ -1,10 +1,3 @@
{{#if hasSelection}}
<div id='selected-controls'>
<button {{action "approveUsers"}} class='btn'>{{count-i18n key="admin.users.approved_selected" count=selectedCount}}</button>
<button {{action "rejectUsers"}} class='btn btn-danger'>{{count-i18n key="admin.users.reject_selected" count=selectedCount}}</button>
</div>
{{/if}}
<div class="admin-title">
<h2>{{title}}</h2>
{{#if canCheckEmails}}
@@ -24,9 +17,6 @@
{{#if model}}
<table class='table users-list grid'>
<thead>
{{#if showApproval}}
<th>{{input type="checkbox" checked=selectAll}}</th>
{{/if}}
{{admin-directory-toggle field="username" i18nKey='username' order=order ascending=ascending}}
{{admin-directory-toggle field="email" i18nKey='email' order=order ascending=ascending}}
{{admin-directory-toggle field="last_emailed" i18nKey='admin.users.last_emailed' order=order ascending=ascending}}
@@ -35,7 +25,7 @@
{{admin-directory-toggle field="posts_read" i18nKey="admin.user.posts_read_count" order=order ascending=ascending}}
{{admin-directory-toggle field="read_time" i18nKey="admin.user.time_read" order=order ascending=ascending}}
{{admin-directory-toggle field="created" i18nKey="created" order=order ascending=ascending}}
{{#if showApproval}}
{{#if siteSettings.must_approve_users}}
<th>{{i18n 'admin.users.approved'}}</th>
{{/if}}
<th>&nbsp;</th>
@@ -43,13 +33,6 @@
<tbody>
{{#each model as |user|}}
<tr class="user {{user.selected}} {{unless user.active 'not-activated'}}">
{{#if showApproval}}
<td class="approval">
{{#if user.can_approve}}
{{input type="checkbox" checked=user.selected}}
{{/if}}
</td>
{{/if}}
<td class="username">
<a href="{{unbound user.path}}" data-user-card="{{unbound user.username}}">
{{avatar user imageSize="small"}}
@@ -88,15 +71,10 @@
<div>{{{format-duration user.created_at_age}}}</div>
</td>
{{#if showApproval}}
<td>
{{#if user.approved}}
{{i18n 'yes_value'}}
{{else}}
{{i18n 'no_value'}}
{{/if}}
</td>
{{#if siteSettings.must_approve_users}}
<td>{{i18n-yes-no user.approved}}</td>
{{/if}}
<td class="user-status">
{{#if user.admin}}
{{d-icon "shield-alt" title="admin.title" }}