FEATURE: responsive admin pages

This commit is contained in:
Joe
2018-07-03 11:14:53 +08:00
committed by GitHub
parent 61955d2aa1
commit 2bfe700bd6
34 changed files with 2553 additions and 1803 deletions

View File

@@ -7,24 +7,22 @@
<div class="admin-title">
<h2>{{title}}</h2>
{{#unless showEmails}}
<button {{action "showEmails"}} class="show-emails btn">{{i18n 'admin.users.show_emails'}}</button>
{{/unless}}
</div>
<div class='username controls'>
{{text-field value=listFilter placeholder=searchHint}}
{{#unless showEmails}}
<div class="pull-right">
<button {{action "showEmails"}} class="show-emails btn">{{i18n 'admin.users.show_emails'}}</button>
</div>
{{/unless}}
</div>
{{#conditional-loading-spinner condition=refreshing}}
{{#if model}}
<table class='table users-list'>
<table class='table users-list grid'>
<thead>
{{#if showApproval}}
<th>{{input type="checkbox" checked=selectAll}}</th>
{{/if}}
<th>&nbsp;</th>
<th>{{i18n 'username'}}</th>
<th class='email-heading'>{{i18n 'email'}}</th>
<th>{{i18n 'admin.users.last_emailed'}}</th>
@@ -42,44 +40,48 @@
{{#each model as |user|}}
<tr class="user {{user.selected}} {{unless user.active 'not-activated'}}">
{{#if showApproval}}
<td>
<td class="approval">
{{#if user.can_approve}}
{{input type="checkbox" checked=user.selected}}
{{/if}}
</td>
{{/if}}
<td>
<td class="username">
<a href="{{unbound user.path}}" data-user-card="{{unbound user.username}}">
{{avatar user imageSize="small"}}
</a>
</td>
<td class="username">
{{#link-to 'adminUser' user}}{{unbound user.username}}{{/link-to}}
{{#if user.staged}}
{{d-icon "envelope-o" title="user.staged" }}
{{/if}}
</td>
<td class='email'>
{{unbound user.email}}
{{~unbound user.email~}}
</td>
<td>
{{{format-duration user.last_emailed_age}}}
<td class="last-emailed">
<div class="label">{{i18n 'admin.users.last_emailed'}}</div>
<div>{{{format-duration user.last_emailed_age}}}</div>
</td>
<td>
{{{format-duration user.last_seen_age}}}
<td class="last-seen">
<div class="label">{{i18n 'last_seen'}}</div>
<div>{{{format-duration user.last_seen_age}}}</div>
</td>
<td>
{{number user.topics_entered}}
<td class="topics-entered">
<div class="label">{{i18n 'admin.user.topics_entered'}}</div>
<div>{{number user.topics_entered}}</div>
</td>
<td>
{{number user.posts_read_count}}
<td class="posts-read">
<div class="label">{{i18n 'admin.user.posts_read_count'}}</div>
<div>{{number user.posts_read_count}}</div>
</td>
<td>
{{{format-duration user.time_read}}}
<td class="time-read">
<div class="label">{{i18n 'admin.user.time_read'}}</div>
<div>{{{format-duration user.time_read}}}</div>
</td>
<td>
{{{format-duration user.created_at_age}}}
<td class="created">
<div class="label">{{i18n 'created'}}</div>
<div>{{{format-duration user.created_at_age}}}</div>
</td>
{{#if showApproval}}
@@ -91,14 +93,13 @@
{{/if}}
</td>
{{/if}}
<td>
<td class="user-status">
{{#if user.admin}}
{{d-icon "shield" title="admin.title" }}
{{/if}}
{{#if user.moderator}}
{{d-icon "shield" title="admin.moderator" }}
{{/if}}
{{#if user.second_factor_enabled}}
{{d-icon "lock" title="admin.user.second_factor_enabled" }}
{{/if}}