Skip to content

Commit

Permalink
Merge pull request #8914 from marcellamaki/sidepanel-title-as-folder-…
Browse files Browse the repository at this point in the history
…title

Sidepanel title as folder title
  • Loading branch information
rtibbles committed Dec 13, 2021
2 parents f8b6c5c + 5418600 commit ac0b0f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
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 @@ -116,7 +116,6 @@
import LearningActivityBar from './LearningActivityBar';
import AlsoInThis from './AlsoInThis';
const sidepanelStrings = crossComponentTranslator(FullScreenSidePanel);
const lessonStrings = crossComponentTranslator(LessonResourceViewer);
export default {
Expand Down Expand Up @@ -241,7 +240,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

0 comments on commit ac0b0f5

Please sign in to comment.