mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-02-28 09:10:59 +01:00
feat(forums): new feature for oper & admin can set topic to show as home help item or home notice item
#20
This commit is contained in:
@@ -453,6 +453,42 @@
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* beginHomeHelpTopic
|
||||
* @param t
|
||||
*/
|
||||
vm.beginHomeHelpTopic = function (t) {
|
||||
var topic = new TopicsService({
|
||||
forum: vm.forum._id,
|
||||
_id: t._id
|
||||
});
|
||||
|
||||
topic.$toggleTopicHomeHelpStatus(function (res) {
|
||||
vm.topic = res;
|
||||
NotifycationService.showSuccessNotify('FORUMS.TOPIC_TOGGLE_HOME_HELP_SUCCESSFULLY');
|
||||
}, function (res) {
|
||||
NotifycationService.showErrorNotify(res.data.message, 'FORUMS.TOPIC_TOGGLE_HOME_HELP_FAILED');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* beginHomeNoticeTopic
|
||||
* @param t
|
||||
*/
|
||||
vm.beginHomeNoticeTopic = function (t) {
|
||||
var topic = new TopicsService({
|
||||
forum: vm.forum._id,
|
||||
_id: t._id
|
||||
});
|
||||
|
||||
topic.$toggleTopicHomeNoticeStatus(function (res) {
|
||||
vm.topic = res;
|
||||
NotifycationService.showSuccessNotify('FORUMS.TOPIC_TOGGLE_HOME_NOTICE_SUCCESSFULLY');
|
||||
}, function (res) {
|
||||
NotifycationService.showErrorNotify(res.data.message, 'FORUMS.TOPIC_TOGGLE_HOME_NOTICE_FAILED');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* beginDeleteReply
|
||||
* @param reply
|
||||
|
||||
Reference in New Issue
Block a user