discourse/app/assets/javascripts/admin/addon/templates/user-tl3-requirements.hbs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

162 lines
7.0 KiB
Handlebars
Raw Normal View History

2015-08-14 02:14:12 +08:00
<div class="admin-controls">
2018-02-15 01:26:05 +08:00
<nav>
2015-08-14 02:14:12 +08:00
<ul class="nav nav-pills">
<li><LinkTo @route="adminUser" @model={{this.model}}>{{d-icon "caret-left"}} &nbsp;{{this.model.username}}</LinkTo></li>
<li><LinkTo @route="adminUsersList.show" @model="member">{{i18n "admin.user.trust_level_2_users"}}</LinkTo></li>
2015-08-14 02:14:12 +08:00
</ul>
2018-02-15 01:26:05 +08:00
</nav>
2015-08-14 02:14:12 +08:00
</div>
<div class="admin-container tl3-requirements">
<h2>{{this.model.username}} - {{i18n "admin.user.tl3_requirements.title"}}</h2>
2015-08-14 02:14:12 +08:00
<br>
<p>{{i18n "admin.user.tl3_requirements.table_title" count=this.model.tl3Requirements.time_period}}</p>
2015-08-14 02:14:12 +08:00
<table class="table" style="width: auto;">
<thead>
<tr>
<th></th>
<th></th>
<th>{{i18n "admin.user.tl3_requirements.value_heading"}}</th>
<th>{{i18n "admin.user.tl3_requirements.requirement_heading"}}</th>
</tr>
</thead>
<tbody>
<tr>
<th>{{i18n "admin.user.tl3_requirements.visits"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.days_visited}}</td>
2015-08-14 02:14:12 +08:00
<td>
{{this.model.tl3Requirements.days_visited_percent}}% ({{this.model.tl3Requirements.days_visited}} / {{this.model.tl3Requirements.time_period}} {{i18n "admin.user.tl3_requirements.days"}})
2015-08-14 02:14:12 +08:00
</td>
<td>{{this.model.tl3Requirements.min_days_visited_percent}}%</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.topics_replied_to"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.topics_replied_to}}</td>
<td>{{#if this.model.tl3Requirements.capped_topics_replied_to}}&ge; {{/if}}{{this.model.tl3Requirements.num_topics_replied_to}}</td>
<td>{{this.model.tl3Requirements.min_topics_replied_to}}</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.topics_viewed"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.topics_viewed}}</td>
<td>{{this.model.tl3Requirements.topics_viewed}}</td>
<td>{{this.model.tl3Requirements.min_topics_viewed}}</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.topics_viewed_all_time"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.topics_viewed_all_time}}</td>
<td>{{this.model.tl3Requirements.topics_viewed_all_time}}</td>
<td>{{this.model.tl3Requirements.min_topics_viewed_all_time}}</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.posts_read"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.posts_read}}</td>
<td>{{this.model.tl3Requirements.posts_read}}</td>
<td>{{this.model.tl3Requirements.min_posts_read}}</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.posts_read_all_time"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.posts_read_all_time}}</td>
<td>{{this.model.tl3Requirements.posts_read_all_time}}</td>
<td>{{this.model.tl3Requirements.min_posts_read_all_time}}</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.flagged_posts"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.flagged_posts}}</td>
<td>{{this.model.tl3Requirements.num_flagged_posts}}</td>
<td>{{i18n "max_of_count" count=this.model.tl3Requirements.max_flagged_posts}}</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.flagged_by_users"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.flagged_by_users}}</td>
<td>{{this.model.tl3Requirements.num_flagged_by_users}}</td>
<td>{{i18n "max_of_count" count=this.model.tl3Requirements.max_flagged_by_users}}</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.likes_given"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.likes_given}}</td>
<td>{{this.model.tl3Requirements.num_likes_given}}</td>
<td>{{this.model.tl3Requirements.min_likes_given}}</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.likes_received"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.likes_received}}</td>
<td>{{this.model.tl3Requirements.num_likes_received}}</td>
<td>{{this.model.tl3Requirements.min_likes_received}}</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.likes_received_days"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.likes_received_days}}</td>
<td>{{this.model.tl3Requirements.num_likes_received_days}}</td>
<td>{{this.model.tl3Requirements.min_likes_received_days}}</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.likes_received_users"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.likes_received_users}}</td>
<td>{{this.model.tl3Requirements.num_likes_received_users}}</td>
<td>{{this.model.tl3Requirements.min_likes_received_users}}</td>
2015-08-14 02:14:12 +08:00
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.silenced"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.silenced}}</td>
<td>{{this.model.tl3Requirements.penalty_counts.silenced}}</td>
<td>0</td>
</tr>
<tr>
<th>{{i18n "admin.user.tl3_requirements.suspended"}}</th>
<td>{{check-icon this.model.tl3Requirements.met.suspended}}</td>
<td>{{this.model.tl3Requirements.penalty_counts.suspended}}</td>
<td>0</td>
</tr>
2015-08-14 02:14:12 +08:00
</tbody>
</table>
<br>
<p>
{{#if this.model.istl3}}
{{#if this.model.tl3Requirements.requirements_lost}}
2015-08-14 02:14:12 +08:00
{{! tl implicitly not locked }}
{{#if this.model.tl3Requirements.on_grace_period}}
{{d-icon "times"}}
{{i18n "admin.user.tl3_requirements.on_grace_period"}}
2015-08-14 02:14:12 +08:00
{{else}}
{{! not on grace period }}
{{d-icon "times"}}
{{i18n "admin.user.tl3_requirements.does_not_qualify"}}
2015-08-14 02:14:12 +08:00
{{i18n "admin.user.tl3_requirements.will_be_demoted"}}
{{/if}}
{{else}}
{{! requirements not lost - remains tl3 }}
{{#if this.model.tl3Requirements.trust_level_locked}}
{{d-icon "lock"}}
{{i18n "admin.user.tl3_requirements.locked_will_not_be_demoted"}}
2015-08-14 02:14:12 +08:00
{{else}}
{{! tl not locked }}
{{d-icon "check"}}
{{i18n "admin.user.tl3_requirements.qualifies"}}
{{#if this.model.tl3Requirements.on_grace_period}}
2015-08-14 02:14:12 +08:00
{{i18n "admin.user.tl3_requirements.on_grace_period"}}
{{/if}}
{{/if}}
{{/if}}
{{else}}
{{! is not tl3 }}
{{#if this.model.tl3Requirements.requirements_met}}
2015-08-14 02:14:12 +08:00
{{! met & not tl3 - will be promoted}}
{{d-icon "check"}}
{{i18n "admin.user.tl3_requirements.qualifies"}}
2015-08-14 02:14:12 +08:00
{{i18n "admin.user.tl3_requirements.will_be_promoted"}}
{{else}}
{{! requirements not met - remains regular }}
{{#if this.model.tl3Requirements.trust_level_locked}}
{{d-icon "lock"}}
{{i18n "admin.user.tl3_requirements.locked_will_not_be_promoted"}}
2015-08-14 02:14:12 +08:00
{{else}}
{{d-icon "times"}}
2020-06-03 04:39:18 +08:00
{{i18n "admin.user.tl3_requirements.does_not_qualify"}}
2015-08-14 02:14:12 +08:00
{{/if}}
{{/if}}
{{/if}}
</p>
</div>