user/guest stats
This commit is contained in:
parent
3cec9cefa2
commit
03ae9a5a8c
2 changed files with 7 additions and 5 deletions
|
@ -518,7 +518,8 @@ Positions
|
|||
response['data']['positions'] = utils.get_positions(ids, data['positions'])
|
||||
else:
|
||||
response['data']['items'] = qs.count()
|
||||
|
||||
response['data']['users'] = qs.exclude(user=None).count()
|
||||
response['data']['guests'] = response['data']['items'] - response['data']['users']
|
||||
return render_to_json_response(response)
|
||||
actions.register(findUsers)
|
||||
|
||||
|
|
|
@ -206,11 +206,12 @@ pandora.ui.usersDialog = function() {
|
|||
})
|
||||
.bindEvent({
|
||||
init: function(data) {
|
||||
numberOfUsers = data.items;
|
||||
$status.html(
|
||||
Ox.formatNumber(numberOfUsers)
|
||||
+ ' user' + (numberOfUsers == 1 ? '' : 's')
|
||||
+ ' (' + Ox.formatNumber(numberOfUsers) + ' registered, 0 guests)'
|
||||
Ox.formatNumber(data.items)
|
||||
+ ' user' + (data.items == 1 ? '' : 's')
|
||||
+ ' (' + Ox.formatNumber(data.users) + ' registered, '
|
||||
+ Ox.formatNumber(data.guests) + ' guest' + (data.guests == 1 ? '' : 's')
|
||||
+ ')'
|
||||
);
|
||||
},
|
||||
select: function(data) {
|
||||
|
|
Loading…
Reference in a new issue