feat(forums): only not vipOnly and not operOnly forum topics can show in home

This commit is contained in:
OldHawk
2018-01-23 12:02:26 +08:00
parent 428f70417a
commit 60b48c9406
2 changed files with 14 additions and 0 deletions

View File

@@ -68,6 +68,18 @@
topicId: '@_id',
replyId: '@_replyId'
}
},
getHomeHelp: {
method: 'GET',
url: '/api/topics/getHomeHelpTopic'
},
getHomeNotice: {
method: 'GET',
url: '/api/topics/getHomeNoticeTopic'
},
getHomeNewTopic: {
method: 'GET',
url: '/api/topics/getHomeNewTopic'
}
});
}

View File

@@ -88,10 +88,12 @@
<i class="fa fa-question-circle-o" aria-hidden="true"
ng-class="{'text-primary': vm.topic.isHomeHelp}"
title="{{'FORUMS.TITLES.HOME_HELP' | translate: ({status: vm.topic.isHomeHelp}) }}"
ng-if="vm.user.isOper && !vm.forum.vipOnly && !vm.forum.operOnly"
ng-click="vm.beginHomeHelpTopic(vm.topic);"></i>
<i class="fa fa-list" aria-hidden="true"
ng-class="{'text-primary': vm.topic.isHomeNotice}"
title="{{'FORUMS.TITLES.HOME_NOTICE' | translate: ({status: vm.topic.isHomeNotice}) }}"
ng-if="vm.user.isOper && !vm.forum.vipOnly && !vm.forum.operOnly"
ng-click="vm.beginHomeNoticeTopic(vm.topic);"></i>
<i class="fa"
ng-class="vm.topic.isTop ? 'fa-arrow-circle-down text-primary' : 'fa-arrow-circle-up'"