diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/CurrentTopicView.vue b/contentcuration/contentcuration/frontend/channelEdit/views/CurrentTopicView.vue index 90487970b9..dcb6159f1c 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/CurrentTopicView.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/CurrentTopicView.vue @@ -407,7 +407,7 @@ label: this.$tr('editLearningActivitiesButton'), icon: 'activities', onClick: this.quickEditModalFactory(QuickEditModals.LEARNING_ACTIVITIES), - condition: this.canEdit, + condition: this.canEdit && this.isResourceSelected, disabled: this.isTopicSelected, dataTest: 'change-learning-activities-btn', }, @@ -417,7 +417,7 @@ label: this.$tr('editSourceButton'), icon: 'attribution', onClick: this.quickEditModalFactory(QuickEditModals.SOURCE), - condition: this.canEdit, + condition: this.canEdit && this.isResourceSelected, disabled: this.isTopicSelected, dataTest: 'change-learning-activities-btn', }, @@ -425,7 +425,7 @@ label: this.$tr('editAudienceButton'), icon: 'audience', onClick: this.quickEditModalFactory(QuickEditModals.AUDIENCE), - condition: this.canEdit, + condition: this.canEdit && this.isResourceSelected, disabled: this.isTopicSelected, dataTest: 'change-audience-btn', }, @@ -463,6 +463,9 @@ isTopicSelected() { return this.selectedNodes.some(node => node.kind === ContentKindsNames.TOPIC); }, + isResourceSelected() { + return this.selectedNodes.some(node => node.kind !== ContentKindsNames.TOPIC); + }, ancestors() { return this.getContentNodeAncestors(this.topicId, true).map(ancestor => { return { diff --git a/yarn.lock b/yarn.lock index b13ebff71d..f2142f37d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9116,9 +9116,9 @@ kolibri-constants@^0.2.0: resolved "https://registry.yarnpkg.com/kolibri-constants/-/kolibri-constants-0.2.0.tgz#47c9d773894e23251ba5ac4db420822e45603142" integrity sha512-WYDMGDzB9gNxRbpX1O2cGe1HrJvLvSZGwMuAv6dqrxJgPf7iO+Hi40/1CXjHM7nk5CRt+hn5bqnMzCBmj1omPA== -"kolibri-design-system@https://github.com/AlexVelezLl/kolibri-design-system#086b5c3f1f109234d1ad4b521651fbc88f04c54c": +"kolibri-design-system@https://github.com/AlexVelezLl/kolibri-design-system#7971ea4b49b7f1c817d80aaa01286e630801d3c2": version "3.0.1" - resolved "https://github.com/AlexVelezLl/kolibri-design-system#086b5c3f1f109234d1ad4b521651fbc88f04c54c" + resolved "https://github.com/AlexVelezLl/kolibri-design-system#7971ea4b49b7f1c817d80aaa01286e630801d3c2" dependencies: "@vue/composition-api" "^1.7.2" aphrodite "https://github.com/learningequality/aphrodite/"