3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-18 00:22:35 +01:00
dbot/views/users/users.jade
2013-01-20 23:07:33 +00:00

74 lines
2.4 KiB
Plaintext

extends ../layout
block content
script(type="text/javascript", src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js")
script
$(document).ready(function(){
// Allowing forcing data such as lincent and wpl to sort as numeric
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"forcenum-pre": function ( a ) {
return parseFloat( a );
},
"forcenum-asc": function ( a, b ) {
return a - b;
},
"forcenum-desc": function ( a, b ) {
return b - a;
}
} );
$('.data').dataTable({
"aoColumnDefs": [
{ "sType": "forcenum", "aTargets": [ 3, 4 ] }
],
"bPaginate": false,
"bLengthChange": false,
"oLanguage": {
"sInfo": "_TOTAL_ users",
"sInfoEmpty": "No users :(",
"sInfoFiltered": "filtered (_MAX_ total)"
},
});
});
h3 Users of #{channel} on #{connection}
div#backlink
a(href='/channels/'+connection) « Channel List
div#row
table.table.table-hover.data
thead
tr
th Users
th Lines
th Words
th Lincent
th Verbosity
th Mentions
tbody
-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
else
span.label.label-important Inactive
else
span.label Offline
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}