Skip to content

Commit 140cd1c

Browse files
committed
add quizresourceselectionheader to channels page, ensure it is hidden when not in the index
1 parent fae72eb commit 140cd1c

File tree

1 file changed

+34
-0
lines changed
  • kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/sidePanels/QuizResourceSelection

1 file changed

+34
-0
lines changed

kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/sidePanels/QuizResourceSelection/index.vue

+34
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@
1919
</div>
2020
</template>
2121
<template #default="{ isScrolled }">
22+
<QuizResourceSelectionHeader
23+
v-if="!settings.selectPracticeQuiz && $route.name === PageNames.QUIZ_SELECT_RESOURCES_INDEX"
24+
class="mb-16"
25+
style="display: flex; flex-direction: row-reverse"
26+
:settings="settings"
27+
:hideTitle="true"
28+
@searchClick="onSearchClick"
29+
/>
30+
31+
<div
32+
v-if="settings.selectPracticeQuiz"
33+
class="d-flex-end mb-16"
34+
>
35+
<KButton
36+
icon="filter"
37+
:text="searchLabel$()"
38+
@click="onSearchClick"
39+
/>
40+
</div>
2241
<div
2342
v-if="showManualSelectionNotice && $route.name !== PageNames.QUIZ_SELECT_RESOURCES_SETTINGS"
2443
class="alert-warning d-flex-between"
@@ -187,6 +206,7 @@
187206
import commonCoreStrings from 'kolibri/uiText/commonCoreStrings';
188207
import { ContentNodeKinds, MAX_QUESTIONS_PER_QUIZ_SECTION } from 'kolibri/constants';
189208
import SidePanelModal from 'kolibri-common/components/SidePanelModal';
209+
import QuizResourceSelectionHeader from '../../../../common/resourceSelection/QuizResourceSelectionHeader.vue';
190210
import { coachStrings } from '../../../../common/commonCoachStrings';
191211
import { exerciseToQuestionArray } from '../../../../../utils/selectQuestions';
192212
import { PageNames } from '../../../../../constants/index';
@@ -199,6 +219,7 @@
199219
name: 'QuizResourceSelection',
200220
components: {
201221
SidePanelModal,
222+
QuizResourceSelectionHeader,
202223
},
203224
mixins: [commonCoreStrings],
204225
setup() {
@@ -601,6 +622,15 @@
601622
}
602623
},
603624
methods: {
625+
onSearchClick() {
626+
this.$router.push({
627+
name:
628+
this.target === SelectionTarget.LESSON
629+
? PageNames.LESSON_SELECT_RESOURCES_SEARCH
630+
: PageNames.QUIZ_SELECT_RESOURCES_SEARCH,
631+
query: this.$route.query,
632+
});
633+
},
604634
saveSelectedResource() {
605635
if (this.settings.selectPracticeQuiz) {
606636
if (this.workingResourcePool.length !== 1) {
@@ -733,4 +763,8 @@
733763
justify-content: space-between;
734764
}
735765
766+
.mb-16 {
767+
margin-bottom: 16px;
768+
}
769+
736770
</style>

0 commit comments

Comments
 (0)