mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
function.generateTopicClass
This commit is contained in:
@@ -61,6 +61,28 @@
|
|||||||
return style.join(' ');
|
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
|
// Groups helpers
|
||||||
helpers.membershipBtn = function(groupObj) {
|
helpers.membershipBtn = function(groupObj) {
|
||||||
if (groupObj.isMember) {
|
if (groupObj.isMember) {
|
||||||
|
|||||||
Reference in New Issue
Block a user