Skip to content

Commit

Permalink
add bookmarked resources
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanOXDi committed Nov 28, 2023
1 parent 300b355 commit 81300e4
Showing 1 changed file with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<template>

<div v-if="!showChannels">
<ContentCardList
:contentList="bookmarksContentList"
Expand Down Expand Up @@ -34,7 +33,18 @@
</div>
</KRouterLink>
</div>
<LessonsSearchBox @searchterm="handleSearchTerm" />
<!-- <KGrid> -->
<!-- <KGridItem :layout12="{ span: 6 }"> -->
<LessonsSearchBox @searchterm="handleSearchTerm" />
<!-- </KGridItem> -->

<!-- <KGridItem :layout12="{ span: 6, alignment: 'right' }">
<p>
{{ $tr('totalResourcesSelected', { total: workingResources.length }) }}
</p>
</KGridItem> -->
<!-- </KGrid> -->

<LessonsSearchFilters
v-if="inSearchMode"
v-model="filters"
Expand All @@ -43,8 +53,6 @@
:searchResults="searchResults"
/>

{{ contentList }}

<ResourceSelectionBreadcrumbs
v-if="!inSearchMode"
:ancestors="ancestors"
Expand Down Expand Up @@ -115,7 +123,7 @@
return {
windowIsSmall,
channels,
filterLessonResource,
filterLessonResource
};
},
data() {
Expand Down Expand Up @@ -178,7 +186,7 @@
},
inSearchMode() {
// return this.pageName === LessonsPageNames.SELECTION_SEARCH;
return this.pageName === PageNames.SELECT_FROM_RESOURCE;
return this.pageNames === PageNames.SELECT_FROM_RESOURCE;
},
page() {

Check failure on line 191 in kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue

View workflow job for this annotation

GitHub Actions / All file linting

Unused computed property found: "page"
return this.getUserPermissions.can_manage_content
Expand Down Expand Up @@ -246,11 +254,7 @@
if (this.inSearchMode && lastId) {
const queryCopy = { ...this.$route.query };
delete queryCopy.last_id;
return this.$router.getRoute(
PageNames.SELECT_FROM_RESOURCE,
{ topicId: lastId },
queryCopy
);
return this.$router.getRoute(PageNames.SELECT_FROM_RESOURCE, { topicId: lastId }, queryCopy);

Check failure on line 257 in kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue

View workflow job for this annotation

GitHub Actions / All file linting

This line has a length of 103. Maximum allowed is 100

Check failure on line 257 in kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue

View workflow job for this annotation

GitHub Actions / All file linting

This line has a length of 103. Maximum allowed is 100
} else if (this.inSearchMode) {
return this.selectionRootLink({ ...this.routerParams });
} else if (this.$route.query.last === 'ReportsLessonReportPage') {
Expand Down Expand Up @@ -323,6 +327,7 @@
this.getBookmarks().then(count => {
this.bookmarksCount = count;
});
console.log(this.filterLessonResource(this.$route.params.lessonId))
},
methods: {
...mapActions(['createSnackbar', 'clearSnackbar']),
Expand All @@ -340,10 +345,10 @@
getBookmarksLink() {
return {
name: PageNames.BOOK_MARKED_RESOURCES,
params: {
classId: this.$route.params.classId,
section_id: this.$route.params.section_id,
},
params:{
classId: this.$route.params.classId,
section_id: this.$route.params.section_id,
}
};
},
lessonCardClicked() {
Expand Down Expand Up @@ -390,11 +395,7 @@
return this.$router.getRoute(PageNames.SELECTION_CONTENT_PREVIEW, {}, this.$route.query);
},
topicListingLink({ topicId }) {
return this.$router.getRoute(
PageNames.SELECT_FROM_RESOURCE,
{ topicId },
this.$route.query
);
return this.$router.getRoute(PageNames.SELECT_FROM_RESOURCE, { topicId }, this.$route.query);

Check failure on line 398 in kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue

View workflow job for this annotation

GitHub Actions / All file linting

This line has a length of 101. Maximum allowed is 100

Check failure on line 398 in kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue

View workflow job for this annotation

GitHub Actions / All file linting

This line has a length of 101. Maximum allowed is 100
},
bookmarkListingLink({ topicId }) {
return this.$router.getRoute(
Expand Down

0 comments on commit 81300e4

Please sign in to comment.