diff --git a/kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/SelectionIndex.vue b/kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/SelectionIndex.vue index 5fefb5d049b..563ebd183b4 100644 --- a/kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/SelectionIndex.vue +++ b/kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/SelectionIndex.vue @@ -1,41 +1,49 @@ <template> <div> - <div - v-if="bookmarksCount > 0" + <QuizResourceSelectionHeader + v-if="target === SelectionTarget.QUIZ && !settings.selectPracticeQuiz" class="mb-24" + :settings="settings" + @searchClick="onSearchClick" + /> + <!-- flexDirection is set to row-reverse to align the search button to the right + when we have no bookmarks and thus, no selectFromBookmarks$ string --> + <div + v-if="target === SelectionTarget.LESSON" + class="subheader" + :style="{ + flexDirection: bookmarksCount > 0 ? 'row' : 'row-reverse', + }" > <div - v-if="target === SelectionTarget.LESSON" - class="subheader" + v-if="bookmarksCount > 0" + class="side-panel-subtitle" > - <div class="side-panel-subtitle"> - {{ selectFromBookmarks$() }} - </div> - <KButton - icon="filter" - :text="searchLabel$()" - @click="onSearchClick" - /> + {{ selectFromBookmarks$() }} </div> + <KButton + icon="filter" + :text="searchLabel$()" + @click="onSearchClick" + /> + </div> - <QuizResourceSelectionHeader - v-if="target === SelectionTarget.QUIZ && !settings.selectPracticeQuiz" - class="mb-24" - :settings="settings" - @searchClick="onSearchClick" + <div + v-if="target === SelectionTarget.QUIZ && settings.selectPracticeQuiz" + class="d-flex-end mb-24" + > + <KButton + icon="filter" + :text="searchLabel$()" + @click="onSearchClick" /> - <div - v-if="target === SelectionTarget.QUIZ && settings.selectPracticeQuiz" - class="d-flex-end mb-24" - > - <KButton - icon="filter" - :text="searchLabel$()" - @click="onSearchClick" - /> - </div> + </div> + <div + v-if="bookmarksCount > 0" + class="mb-24" + > <KCardGrid layout="1-1-1" :layoutOverride="gridLayoutOverrides"