|
|
@ -9,13 +9,13 @@ const getOrderString = function(order) { |
|
|
|
} |
|
|
|
} |
|
|
|
this.createSortableTitle = function(item, display, defaultOrder) { |
|
|
|
this.createSortableTitle = function(item, display, defaultOrder) { |
|
|
|
const isCurrent = curSort === item; |
|
|
|
const isCurrent = curSort === item; |
|
|
|
const url = syzoj.utils.makeUrl(req, |
|
|
|
const url = syzoj.utils.makeUrl(req, |
|
|
|
Object.assign({}, req.query, { |
|
|
|
Object.assign({}, req.query, { |
|
|
|
sort: item, |
|
|
|
sort: item, |
|
|
|
order: getOrderString(isCurrent ? (!curOrder) : defaultOrder) |
|
|
|
order: getOrderString(isCurrent ? (!curOrder) : defaultOrder) |
|
|
|
})); |
|
|
|
})); |
|
|
|
const triangle = isCurrent ? `<i class="${curOrder ? "angle up" : "angle down"} icon"></i>` : ""; |
|
|
|
const triangle = isCurrent ? `<i class="${curOrder ? "angle up" : "angle down"} icon"></i>` : ""; |
|
|
|
return `<a href="${url}">${display}${triangle}</a>`; |
|
|
|
return `<a class="black-link" href="${url}">${display}${triangle}</a>`; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.isPending = (status) => { |
|
|
|
this.isPending = (status) => { |
|
|
|