mirror of
https://github.com/reality/dbot.git
synced 2024-12-26 12:42:51 +01:00
89 lines
3.1 KiB
Plaintext
89 lines
3.1 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 of string stats data to sort as numeric
|
|
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
|
|
"forcenum-pre": function ( a ) {
|
|
a = a.replace("\,", "");
|
|
return parseFloat( a );
|
|
},
|
|
|
|
"forcenum-asc": function ( a, b ) {
|
|
return a - b;
|
|
},
|
|
|
|
"forcenum-desc": function ( a, b ) {
|
|
return b - a;
|
|
}
|
|
} );
|
|
|
|
$('.tip').tooltip();
|
|
$('.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 ] }
|
|
],
|
|
"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
|
|
th Lines
|
|
th Words
|
|
th Lincent
|
|
th Verbosity
|
|
th Mentions
|
|
tbody
|
|
-each nick in nicks
|
|
tr
|
|
td
|
|
a(href='/profile/'+connection+'/'+nick.primary)
|
|
#{nick.display}
|
|
span
|
|
if nick.online
|
|
if nick.active.active
|
|
span.label.label-success.tip(data-original-title="#{nick.active.ago}", data-placement="right") Active
|
|
else
|
|
span.label.label-important.tip(data-original-title="#{nick.active.ago}", data-placement="right") Inactive
|
|
else
|
|
span.label.tip(data-original-title="#{nick.active.ago}", data-placement="right") Offline
|
|
td
|
|
if nick.online
|
|
if nick.active.active
|
|
-1
|
|
else
|
|
0
|
|
else
|
|
1
|
|
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}
|