mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-05 05:25:49 +01:00
function.generateTopicClass
This commit is contained in:
@@ -61,6 +61,28 @@
|
||||
return style.join(' ');
|
||||
};
|
||||
|
||||
helpers.generateTopicClass = function(topic) {
|
||||
var style = [];
|
||||
|
||||
if (topic.locked) {
|
||||
style.push('locked');
|
||||
}
|
||||
|
||||
if (topic.pinned) {
|
||||
style.push('pinned');
|
||||
}
|
||||
|
||||
if (topic.deleted) {
|
||||
style.push('deleted');
|
||||
}
|
||||
|
||||
if (topic.unread) {
|
||||
style.push('unread');
|
||||
}
|
||||
|
||||
return style.join(' ');
|
||||
};
|
||||
|
||||
// Groups helpers
|
||||
helpers.membershipBtn = function(groupObj) {
|
||||
if (groupObj.isMember) {
|
||||
|
||||
Reference in New Issue
Block a user