Add library and user page helper functions

This commit is contained in:
JonnyWong16 2020-02-20 10:13:27 -08:00
parent 5fad0a1d97
commit 5480d09a0b
15 changed files with 98 additions and 51 deletions

View file

@ -51,9 +51,9 @@ sync_table_options = {
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
if (rowData['user_id']) {
$(td).html('<a href="user?user_id=' + rowData['user_id'] + '">' + cellData + '</a>');
$(td).html('<a href="' + page('user', rowData['user_id']) + '>' + cellData + '</a>');
} else {
$(td).html('<a href="user?user=' + rowData['user'] + '">' + cellData + '</a>');
$(td).html('<a href="' + page('user', null, rowData['user']) + '">' + cellData + '</a>');
}
} else {
$(td).html(cellData);
@ -67,7 +67,7 @@ sync_table_options = {
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
if (rowData['rating_key']) {
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
$(td).html('<a href="' + page('info', rowData['rating_key']) + '">' + cellData + '</a>');
} else {
$(td).html(cellData);
}