diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterBar.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterBar.vue
index 8ad32a5ae3..6fb71d6b64 100644
--- a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterBar.vue
+++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterBar.vue
@@ -19,68 +19,6 @@
@click="clearFilters"
/>
-
-
-
-
-
-
-
- local_hospital
-
-
-
-
-
-
- {{ collection.name }}
-
-
- {{ $tr('channelCount', { count: collection.count }) }}
-
-
- {{ collection.description }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $tr('copyTokenInstructions') }}
-
-
-
-
-
@@ -90,10 +28,6 @@
import flatten from 'lodash/flatten'; // Tests fail with native Array.flat() method
import { catalogFilterMixin } from './mixins';
import { constantsTranslationMixin } from 'shared/mixins';
- import IconButton from 'shared/views/IconButton';
- import CopyToken from 'shared/views/CopyToken';
-
- const publicCollections = window.publicCollections || [];
/*
Returns the expected format for filters
@@ -108,16 +42,7 @@
export default {
name: 'CatalogFilterBar',
- components: {
- IconButton,
- CopyToken,
- },
mixins: [constantsTranslationMixin, catalogFilterMixin],
- data() {
- return {
- displayToken: null,
- };
- },
computed: {
currentFilters() {
return flatten([
@@ -150,24 +75,10 @@
createFilter(this.coach, this.$tr('coachContent'), this.resetCoach),
createFilter(this.assessments, this.$tr('assessments'), this.resetAssessments),
createFilter(this.subtitles, this.$tr('subtitles'), this.resetSubtitles),
- createFilter(this.collection, this.getCollectionName(), this.resetCollection),
]).filter(Boolean);
},
- collections() {
- return publicCollections;
- },
},
methods: {
- getCollectionName() {
- const collection = this.collections.find(c => c.id === this.collection);
- return collection && collection.name;
- },
- setCollection(collectionId) {
- this.collection = collectionId;
- },
- resetCollection() {
- this.setCollection(null);
- },
resetKeywords() {
this.keywords = '';
},
@@ -200,12 +111,6 @@
subtitles: 'Subtitles',
starred: 'Starred',
clearAll: 'Clear all',
- channelCount: '{count, plural,\n =1 {# channel}\n other {# channels}}',
- copyToken: 'Copy collection token',
- copyTitle: 'Copy collection token',
- copyTokenInstructions:
- 'Paste this token into Kolibri to import the channels contained in this collection',
- close: 'Close',
},
};
diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/__tests__/catalogFilterBar.spec.js b/contentcuration/contentcuration/frontend/channelList/views/Channel/__tests__/catalogFilterBar.spec.js
index c04a3fff5f..7879e17ba5 100644
--- a/contentcuration/contentcuration/frontend/channelList/views/Channel/__tests__/catalogFilterBar.spec.js
+++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/__tests__/catalogFilterBar.spec.js
@@ -35,16 +35,6 @@ describe('catalogFilterBar', () => {
wrapper = makeWrapper();
});
- describe('public collections', () => {
- it('should list collections if no filters are selected', () => {
- expect(wrapper.find('[data-test="collection"]').exists()).toBe(true);
- });
- it('should filter by collection if one on click', () => {
- wrapper.find('[data-test="collection"]').trigger('click');
- expect(wrapper.vm.collection).toBe(collection.id);
- });
- });
-
describe('removing filters', () => {
beforeEach(() => {
Object.entries(query).forEach(([key, val]) => {
@@ -75,15 +65,6 @@ describe('catalogFilterBar', () => {
expect(wrapper.vm.$route.query.languages).toBeTruthy();
expect(wrapper.vm.$route.query.keywords).toBeTruthy();
});
- it('removing collection filter should remove it from the query', () => {
- wrapper.vm.resetCollection();
- expect(wrapper.vm.$route.query.collection).toBeUndefined();
-
- // Make sure other queries weren't affected
- expect(wrapper.vm.$route.query.coach).toBeTruthy();
- expect(wrapper.vm.$route.query.languages).toBeTruthy();
- expect(wrapper.vm.$route.query.keywords).toBeTruthy();
- });
it('removing list-based filter should only remove that item from the query', () => {
wrapper.vm.removeLanguage('en');
expect(wrapper.vm.$route.query.languages).toBe('es');
diff --git a/contentcuration/contentcuration/templates/channel_list.html b/contentcuration/contentcuration/templates/channel_list.html
index 746e52f487..5f7cae13c7 100644
--- a/contentcuration/contentcuration/templates/channel_list.html
+++ b/contentcuration/contentcuration/templates/channel_list.html
@@ -31,7 +31,6 @@
var publicLanguages = JSON.parse({{ public_languages | safe }});
var publicLicenses = JSON.parse({{ public_licenses | safe }});
var publicKinds = JSON.parse({{ public_kinds | safe }});
- var publicCollections = JSON.parse({{ public_collections | safe }});
{% render_bundle 'channel_list' 'js' %}
diff --git a/contentcuration/contentcuration/views/base.py b/contentcuration/contentcuration/views/base.py
index 1f0eb999d4..f953e70e9b 100644
--- a/contentcuration/contentcuration/views/base.py
+++ b/contentcuration/contentcuration/views/base.py
@@ -263,23 +263,6 @@ def channel_list(request):
kinds = list(public_kind_query)
cache.set(PUBLIC_CHANNELS_CACHE_KEYS["kinds"], json_for_parse_from_data(kinds), None)
- # Get public channel sets
- collections = cache.get(PUBLIC_CHANNELS_CACHE_KEYS["collections"])
- if collections is None:
- public_channelset_query = ChannelSet.objects.filter(public=True).annotate(
- count=SQCountDistinct(
- Channel.objects.filter(
- secret_tokens=OuterRef("secret_token"),
- public=True,
- main_tree__published=True,
- deleted=False,
- ).values_list("id", flat=True),
- field="id",
- )
- )
- cache.set(PUBLIC_CHANNELS_CACHE_KEYS["collections"], json_for_parse_from_serializer(
- PublicChannelSetSerializer(public_channelset_query, many=True)), None)
-
return render(
request,
"channel_list.html",
@@ -291,7 +274,6 @@ def channel_list(request):
"public_languages": languages,
"public_kinds": kinds,
"public_licenses": licenses,
- "public_collections": collections,
},
)