FEATURE: trust level 3: likes received must be on min_likes_received/3 different days, and be from min_likes_received/4 different users

This commit is contained in:
Neil Lalonde
2014-10-07 15:52:54 -04:00
parent 056438a7f4
commit a30e70e8f1
6 changed files with 89 additions and 9 deletions
@@ -19,6 +19,8 @@ Discourse.TL3Requirements = Discourse.Model.extend({
flagged_by_users: this.get('num_flagged_by_users') <= this.get('max_flagged_by_users'),
likes_given: this.get('num_likes_given') >= this.get('min_likes_given'),
likes_received: this.get('num_likes_received') >= this.get('min_likes_received'),
likes_received_days: this.get('num_likes_received_days') >= this.get('min_likes_received_days'),
likes_received_users: this.get('num_likes_received_users') >= this.get('min_likes_received_users'),
level_locked: this.get('trust_level_locked')
};
}.property('days_visited', 'min_days_visited',
@@ -31,5 +33,8 @@ Discourse.TL3Requirements = Discourse.Model.extend({
'num_flagged_by_users', 'max_flagged_by_users',
'num_likes_given', 'min_likes_given',
'num_likes_received', 'min_likes_received',
'num_likes_received', 'min_likes_received',
'num_likes_received_days', 'min_likes_received_days',
'num_likes_received_users', 'min_likes_received_users',
'trust_level_locked')
});
@@ -13,7 +13,7 @@
<p>{{i18n admin.user.tl3_requirements.table_title}}</p>
{{#with tl3Requirements}}
<table class="table" style="width: 50%;">
<table class="table" style="width: auto;">
<thead>
<tr>
<th></th>
@@ -85,6 +85,18 @@
<td>{{num_likes_received}}</td>
<td>{{min_likes_received}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.likes_received_days}}</th>
<td><i {{bind-attr class=":fa met.likes_received_days:fa-check:fa-times"}}></i></td>
<td>{{num_likes_received_days}}</td>
<td>{{min_likes_received_days}}</td>
</tr>
<tr>
<th>{{i18n admin.user.tl3_requirements.likes_received_users}}</th>
<td><i {{bind-attr class=":fa met.likes_received_users:fa-check:fa-times"}}></i></td>
<td>{{num_likes_received_users}}</td>
<td>{{min_likes_received_users}}</td>
</tr>
</tbody>
</table>
{{/with}}