diff --git a/kolibri/plugins/learn/assets/src/composables/useContentLink.js b/kolibri/plugins/learn/assets/src/composables/useContentLink.js index d5bce334591..00447fa62f6 100644 --- a/kolibri/plugins/learn/assets/src/composables/useContentLink.js +++ b/kolibri/plugins/learn/assets/src/composables/useContentLink.js @@ -2,6 +2,7 @@ import { get } from '@vueuse/core'; import isEmpty from 'lodash/isEmpty'; import pick from 'lodash/pick'; import { computed, getCurrentInstance } from 'vue'; +import { primaryLanguageKey } from 'kolibri-common/composables/useBaseSearch'; import { ExternalPagePaths, PageNames } from '../constants'; function _decodeBackLinkQuery(query) { @@ -17,6 +18,10 @@ export default function useContentLink(store) { function _makeNodeLink(id, isResource, query, deviceId) { const params = get(route).params; + const oldQuery = get(route).query || {}; + if (!isResource && oldQuery[primaryLanguageKey]) { + query[primaryLanguageKey] = oldQuery[primaryLanguageKey]; + } return { name: isResource ? PageNames.TOPICS_CONTENT : PageNames.TOPICS_TOPIC, params: pick({ id, deviceId: deviceId || params.deviceId }, ['id', 'deviceId']), diff --git a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue index b0499ab0f87..4a9e997c1b8 100644 --- a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue +++ b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue @@ -49,9 +49,16 @@ v-else-if="!displayingSearchResults && !rootNodesLoading" data-test="channels" > -

- {{ channelsLabel }} -

+ + +

+ {{ channelsLabel }} +

+
+ + + +

@@ -122,6 +130,7 @@ v-model="searchTerms" data-test="side-panel" :width="`${sidePanelWidth}px`" + :showLanguages="displayingSearchResults" /> @@ -176,20 +185,22 @@ diff --git a/packages/kolibri-common/components/SearchFiltersPanel/SelectGroup.vue b/packages/kolibri-common/components/SearchFiltersPanel/SelectGroup.vue index cf26123bff5..0a94c833d44 100644 --- a/packages/kolibri-common/components/SearchFiltersPanel/SelectGroup.vue +++ b/packages/kolibri-common/components/SearchFiltersPanel/SelectGroup.vue @@ -1,16 +1,9 @@