Skip to content

Commit 6862282

Browse files
committed
conditionalize selectFromBookmarks$ in lessons based on bookmarks count
1 parent cf9a9d3 commit 6862282

File tree

1 file changed

+20
-12
lines changed
  • kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages

1 file changed

+20
-12
lines changed

kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/SelectionIndex.vue

+20-12
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,32 @@
77
:settings="settings"
88
@searchClick="onSearchClick"
99
/>
10+
<!-- flexDirection is set to row-reverse to align the search button to the right
11+
when we have no bookmarks and thus, no selectFromBookmarks$ string -->
1012
<div
11-
v-if="bookmarksCount > 0"
12-
class="mb-24"
13+
v-if="target === SelectionTarget.LESSON"
14+
class="subheader"
15+
:style="{
16+
flexDirection: bookmarksCount > 0 ? 'row' : 'row-reverse',
17+
}"
1318
>
1419
<div
15-
v-if="target === SelectionTarget.LESSON"
16-
class="subheader"
20+
v-if="bookmarksCount > 0"
21+
class="side-panel-subtitle"
1722
>
18-
<div class="side-panel-subtitle">
19-
{{ selectFromBookmarks$() }}
20-
</div>
21-
<KButton
22-
icon="filter"
23-
:text="searchLabel$()"
24-
@click="onSearchClick"
25-
/>
23+
{{ selectFromBookmarks$() }}
2624
</div>
25+
<KButton
26+
icon="filter"
27+
:text="searchLabel$()"
28+
@click="onSearchClick"
29+
/>
30+
</div>
2731

32+
<div
33+
v-if="bookmarksCount > 0"
34+
class="mb-24"
35+
>
2836
<div
2937
v-if="target === SelectionTarget.QUIZ && settings.selectPracticeQuiz"
3038
class="d-flex-end mb-24"

0 commit comments

Comments
 (0)