3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-01 00:19:29 +01:00
dbot/views/users/users.jade

88 lines
2.9 KiB
Plaintext
Raw Normal View History

2012-12-24 06:47:47 +01:00
extends ../layout
block content
2013-01-21 00:07:33 +01:00
script(type="text/javascript", src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js")
script
$(document).ready(function(){
2013-01-21 00:15:26 +01:00
// Allowing forcing of string stats data to sort as numeric
2013-01-21 00:07:33 +01:00
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"forcenum-pre": function ( a ) {
2013-01-21 00:15:26 +01:00
a = a.replace("\,", "");
2013-01-21 00:07:33 +01:00
return parseFloat( a );
},
"forcenum-asc": function ( a, b ) {
return a - b;
},
"forcenum-desc": function ( a, b ) {
return b - a;
}
} );
$('.data').dataTable({
"aoColumnDefs": [
{ "aDataSort": [ 1, 0 ], "asSorting": [ "asc" ], "aTargets": [ 0 ] },
{ "bVisible": false, "aTargets": [ 1 ] },
{ "sType": "forcenum",
"asSorting": [ "desc", "asc" ],
"aTargets": [ 2, 3, 4, 5, 6 ] }
2013-01-21 00:07:33 +01:00
],
"bPaginate": false,
"bLengthChange": false,
"oLanguage": {
"sInfo": "_TOTAL_ users",
2013-01-21 00:25:00 +01:00
"sInfoEmpty": "No users",
2013-01-21 00:07:33 +01:00
"sInfoFiltered": "filtered (_MAX_ total)"
},
});
});
h3 Users of #{channel} on #{connection}
div#backlink
a(href='/channels/'+connection) « Channel List
div#row
2013-01-21 00:07:33 +01:00
table.table.table-hover.data
thead
2013-01-11 23:39:32 +01:00
tr
th Users
th
2013-01-11 23:39:32 +01:00
th Lines
th Words
th Lincent
th Verbosity
th Mentions
tbody
2013-01-15 21:44:15 +01:00
-each nick in nicks
tr
td
a(href='/profile/'+connection+'/'+nick.primary)
2013-01-11 23:39:32 +01:00
#{nick.display}
span
2013-01-15 21:44:15 +01:00
if nick.online
if nick.active
span.label.label-success Active
else
span.label.label-important Inactive
else
span.label Offline
td
if nick.online
if nick.active
-1
else
0
else
1
2013-01-11 23:39:32 +01:00
td
#{nick.fields.lines.data}
2013-01-11 23:39:32 +01:00
td
#{nick.fields.words.data}
2013-01-11 23:39:32 +01:00
td
#{nick.fields.lincent.data}
2013-01-11 23:39:32 +01:00
td
#{nick.fields.wpl.data}
2013-01-11 23:39:32 +01:00
td
#{nick.fields.in_mentions.data}