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
app/assets
javascripts/discourse/templates/components
stylesheets/common/admin
config/locales

View file

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

View file

@ -85,6 +85,14 @@ td.flaggers td {
.close {
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)
organisation: Organization
phone: Phone
other_accounts: Other accounts with this IP address
other_accounts: "Other accounts with this IP address:"
no_other_accounts: (none)
read_time: "read time:"
topics_entered: "topics entered:"
user:
said: "{{username}}:"