Merge pull request #2587 from overleaf/msm-ns-disable-comment-button

disable "add comment" button if feature is not available

GitOrigin-RevId: e054f138a84ec634cc777d76e8a288ba2c1b2ee3
This commit is contained in:
Simon Detheridge 2020-02-12 15:13:34 +00:00 committed by Copybot
parent 96cd1c869e
commit 72c5286622
2 changed files with 43 additions and 36 deletions

View file

@ -21,6 +21,10 @@ const supportModuleAvailable = fs.existsSync(
`${__dirname}/../../../modules/support`
)
const trackChangesModuleAvailable = fs.existsSync(
`${__dirname}/../../../modules/track-changes`
)
module.exports = Features = {
externalAuthenticationSystemUsed() {
return (
@ -69,6 +73,8 @@ module.exports = Features = {
return publicRegistrationModuleAvailable
case 'support':
return supportModuleAvailable
case 'track-changes':
return trackChangesModuleAvailable
default:
throw new Error(`unknown feature: ${feature}`)
}

View file

@ -22,6 +22,7 @@
i.fa.fa-times
|  #{translate("reject_all")}
| ({{ reviewPanel.nVisibleSelectedChanges }})
if hasFeature('track-changes')
a.rp-add-comment-btn(
href
ng-if="reviewPanel.entries[editor.open_doc_id]['add-comment'] != null && permissions.comment"