|
19 | 19 | </div>
|
20 | 20 | </template>
|
21 | 21 | <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> |
22 | 41 | <div
|
23 | 42 | v-if="showManualSelectionNotice && $route.name !== PageNames.QUIZ_SELECT_RESOURCES_SETTINGS"
|
24 | 43 | class="alert-warning d-flex-between"
|
|
187 | 206 | import commonCoreStrings from 'kolibri/uiText/commonCoreStrings';
|
188 | 207 | import { ContentNodeKinds, MAX_QUESTIONS_PER_QUIZ_SECTION } from 'kolibri/constants';
|
189 | 208 | import SidePanelModal from 'kolibri-common/components/SidePanelModal';
|
| 209 | + import QuizResourceSelectionHeader from '../../../../common/resourceSelection/QuizResourceSelectionHeader.vue'; |
190 | 210 | import { coachStrings } from '../../../../common/commonCoachStrings';
|
191 | 211 | import { exerciseToQuestionArray } from '../../../../../utils/selectQuestions';
|
192 | 212 | import { PageNames } from '../../../../../constants/index';
|
|
199 | 219 | name: 'QuizResourceSelection',
|
200 | 220 | components: {
|
201 | 221 | SidePanelModal,
|
| 222 | + QuizResourceSelectionHeader, |
202 | 223 | },
|
203 | 224 | mixins: [commonCoreStrings],
|
204 | 225 | setup() {
|
|
601 | 622 | }
|
602 | 623 | },
|
603 | 624 | 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 | + }, |
604 | 634 | saveSelectedResource() {
|
605 | 635 | if (this.settings.selectPracticeQuiz) {
|
606 | 636 | if (this.workingResourcePool.length !== 1) {
|
|
733 | 763 | justify-content: space-between;
|
734 | 764 | }
|
735 | 765 |
|
| 766 | + .mb-16 { |
| 767 | + margin-bottom: 16px; |
| 768 | + } |
| 769 | +
|
736 | 770 | </style>
|
0 commit comments