Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidepanel title as folder title #8914

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion kolibri/plugins/learn/assets/src/views/AlsoInThis.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
>
<KIcon class="folder-icon" icon="topic" />
<div class="next-label">
Next folder
{{ nextFolderMessage }}
</div>
<div class="next-title">
{{ nextContent.title }}
Expand Down Expand Up @@ -163,6 +163,11 @@
context() {
return this.$route.query;
},
nextFolderMessage() {
/* eslint-disable kolibri/vue-no-undefined-string-uses */
return sidePanelStrings.$tr('nextFolder');
/* eslint-enable */
},
},
methods: {
genContentLink,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
import LearningActivityBar from './LearningActivityBar';
import AlsoInThis from './AlsoInThis';

const sidepanelStrings = crossComponentTranslator(FullScreenSidePanel);
const lessonStrings = crossComponentTranslator(LessonResourceViewer);

export default {
Expand Down Expand Up @@ -227,7 +226,7 @@
/* eslint-disable kolibri/vue-no-undefined-string-uses */
return this.lessonContext
? lessonStrings.$tr('nextInLesson')
: sidepanelStrings.$tr('topicHeader');
: this.content && this.content.ancestors.slice(-1)[0].title;
/* eslint-enable */
},
},
Expand Down