2013-01-22 21:44:45 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2013-01-23 19:00:27 +01:00
|
|
|
$('.tip').tooltip();
|
2013-01-22 21:44:45 +01:00
|
|
|
$('.data').dataTable({
|
|
|
|
"aoColumnDefs": [
|
|
|
|
{ "sType": "forcenum",
|
|
|
|
"asSorting": [ "desc", "asc" ],
|
|
|
|
"aTargets": [ 1, 2, 3, 4, 5 ] }
|
|
|
|
],
|
|
|
|
"bPaginate": false,
|
|
|
|
"bFilter": false,
|
|
|
|
"bLengthChange": false,
|
|
|
|
"oLanguage": {
|
|
|
|
"sInfo": "",
|
|
|
|
"sInfoEmpty": "",
|
|
|
|
"sInfoFiltered": ""
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2013-01-23 20:13:10 +01:00
|
|
|
div.page-header.profile_page-header
|
2013-01-22 21:44:45 +01:00
|
|
|
h1
|
|
|
|
#{primary}
|
2013-01-23 20:13:10 +01:00
|
|
|
small
|
2013-01-24 23:07:43 +01:00
|
|
|
if(profile.tagline)
|
|
|
|
"#{profile.tagline}"
|
|
|
|
div#backlink
|
|
|
|
a(href='/profile/'+connection) « Profiles
|
2013-01-23 20:13:10 +01:00
|
|
|
|
|
|
|
div.row.profile_row#profile_data
|
|
|
|
div.span3
|
|
|
|
if profile.avatar
|
2013-01-24 23:53:23 +01:00
|
|
|
img.profile_avatar.img-polaroid(src="#{profile.avatar}")
|
2013-01-23 20:13:10 +01:00
|
|
|
else
|
2013-01-25 00:26:23 +01:00
|
|
|
img.profile_avatar.img-polaroid(src="http://placehold.it/270x180&text=Hello,%20World")
|
2013-01-23 20:13:10 +01:00
|
|
|
div.span9
|
|
|
|
h4 Bio
|
|
|
|
p #{profile.bio}
|
|
|
|
|
|
|
|
hr
|
|
|
|
h3 Channel Statistics
|
|
|
|
div#profile_datatable
|
2013-01-22 21:44:45 +01:00
|
|
|
table.table.table-hover.data
|
|
|
|
thead
|
|
|
|
tr
|
|
|
|
th Channel
|
|
|
|
th Lines
|
|
|
|
th Words
|
|
|
|
th Lincent
|
|
|
|
th Verbosity
|
|
|
|
th Mentions
|
|
|
|
tbody
|
|
|
|
for chan, key in stats
|
|
|
|
if stats.hasOwnProperty(key)
|
|
|
|
tr
|
|
|
|
td
|
|
|
|
a(href='/users/'+connection+'/'+encodeURIComponent(key))
|
|
|
|
#{key}
|
|
|
|
span
|
|
|
|
if chan.online
|
2013-01-23 19:00:27 +01:00
|
|
|
if chan.active.active
|
|
|
|
span.label.label-success.tip(data-original-title="#{chan.active.ago}", data-placement="right") Active
|
2013-01-22 21:44:45 +01:00
|
|
|
else
|
2013-01-23 19:00:27 +01:00
|
|
|
span.label.label-important.tip(data-original-title="#{chan.active.ago}", data-placement="right") Inactive
|
2013-01-22 21:44:45 +01:00
|
|
|
else
|
2013-01-23 19:00:27 +01:00
|
|
|
span.label.tip(data-original-title="#{chan.active.ago}", data-placement="right") Offline
|
2013-01-22 21:44:45 +01:00
|
|
|
td
|
|
|
|
#{chan.fields.lines.data}
|
|
|
|
td
|
|
|
|
#{chan.fields.words.data}
|
|
|
|
td
|
|
|
|
#{chan.fields.lincent.data}
|
|
|
|
td
|
|
|
|
#{chan.fields.wpl.data}
|
|
|
|
td
|
|
|
|
#{chan.fields.in_mentions.data}
|