Better users web

This commit is contained in:
Sam Nicholls 2013-01-15 20:44:15 +00:00
parent 76382a6daa
commit 078f3b943b
2 changed files with 11 additions and 37 deletions

View File

@ -58,8 +58,10 @@ var pages = function(dbot) {
userData.inactive.sort(userSort);
userData.offline.sort(userSort);
var userDataSorted = (userData.active.concat(userData.inactive)).concat(userData.offline);
res.render('users', { 'name': dbot.config.name, 'connection': connection,
'channel': channel, 'nicks': userData });
'channel': channel, 'nicks': userDataSorted });
} else {
res.render_core('error', { 'name': dbot.config.name, 'message': 'No such connection or channel.' });
}

View File

@ -15,46 +15,18 @@ block content
th Verbosity
th Mentions
tbody
-each nick in nicks.active
-each nick in nicks
tr
td
a(href='/user/'+connection+'/'+channel.substr(1,channel.length)+'/'+nick.primary)
#{nick.display}
span
if nick.online
if nick.active
span.label.label-success Active
td
#{nick.fields.lines.data}
td
#{nick.fields.words.data}
td
#{nick.fields.lincent.data}
td
#{nick.fields.wpl.data}
td
#{nick.fields.in_mentions.data}
-each nick in nicks.inactive
tr
td
a(href='/user/'+connection+'/'+channel.substr(1,channel.length)+'/'+nick.primary)
#{nick.display}
span
else
span.label.label-important Inactive
td
#{nick.fields.lines.data}
td
#{nick.fields.words.data}
td
#{nick.fields.lincent.data}
td
#{nick.fields.wpl.data}
td
#{nick.fields.in_mentions.data}
-each nick in nicks.offline
tr
td
a(href='/user/'+connection+'/'+channel.substr(1,channel.length)+'/'+nick.primary)
#{nick.display}
span
else
span.label Offline
td
#{nick.fields.lines.data}