FEATURE: improve admin IP lookup dialog (add username/trust level/read time/topics entered)

This commit is contained in:
Régis Hanol 2014-11-17 14:51:28 +01:00
parent 7641d88224
commit fae19aa56c
3 changed files with 27 additions and 11 deletions

View File

@ -33,20 +33,26 @@
<dd>{{location.phone}}</dd> <dd>{{location.phone}}</dd>
{{/if}} {{/if}}
{{else}} {{else}}
<div class="spinner"></div> {{loading-spinner size="small"}}
{{/if}} {{/if}}
<dt>{{i18n ip_lookup.other_accounts}}</dt> <dt>{{i18n ip_lookup.other_accounts}}&nbsp;<strong>{{other_accounts.length}}</strong></dt>
<dd> <dd class="other-accounts">
{{#if other_accounts_loading}} {{#loading-spinner size="small" condition=other_accounts_loading}}
<div class="spinner"></div> {{#if other_accounts}}
{{else}} <ul>
{{#each other_accounts}} {{#each other_accounts}}
{{#link-to "adminUser" this}}{{avatar this usernamePath="user.username" imageSize="small"}}{{/link-to}} <li>
{{#link-to "adminUser" this}}{{avatar this usernamePath="user.username" imageSize="small"}}&nbsp;{{username}}{{/link-to}}
({{trustLevel.name}}),
<strong>{{i18n ip_lookup.read_time}}</strong>&nbsp;{{time_read}},
<strong>{{i18n ip_lookup.topics_entered}}</strong>&nbsp;{{topics_entered}}
</li>
{{/each}}
{{else}} {{else}}
{{i18n ip_lookup.no_other_accounts}} {{i18n ip_lookup.no_other_accounts}}
{{/each}} {{/if}}
{{/if}} {{/loading-spinner}}
<dd> <dd>
</dl> </dl>
<button class="btn close" {{action "hide"}}>{{i18n close}}</button> <button class="btn close" {{action "hide"}}>{{i18n close}}</button>

View File

@ -85,6 +85,14 @@ td.flaggers td {
.close { .close {
float: right; float: right;
} }
.other-accounts {
margin: 0;
max-height: 200px;
overflow: auto;
ul { margin: 0; }
li { list-style: none; }
}
} }
} }

View File

@ -278,8 +278,10 @@ en:
location_not_found: (unknown) location_not_found: (unknown)
organisation: Organization organisation: Organization
phone: Phone phone: Phone
other_accounts: Other accounts with this IP address other_accounts: "Other accounts with this IP address:"
no_other_accounts: (none) no_other_accounts: (none)
read_time: "read time:"
topics_entered: "topics entered:"
user: user:
said: "{{username}}:" said: "{{username}}:"