Skip to content

Commit

Permalink
fix: empty slot value for search results
Browse files Browse the repository at this point in the history
  • Loading branch information
BramMeir committed May 1, 2024
1 parent 92ea064 commit 5b96a53
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion frontend/src/assets/lang/app/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@
},
"noCourses": {
"student": "No courses found. Register for a public course using the search function, or use an invitation link from a teacher.",
"teacher": "No courses found. Create a new course with the button below."
"teacher": "No courses found. Create a new course with the button below.",
"search": "No courses found for the given search criteria."
},
"noResults": "No results.",
"noIncomingProjects": "No projects with a deadline within 7 days.",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/assets/lang/app/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@
},
"noCourses": {
"student": "Geen vakken gevonden. Schrijf in op een openbaar vak met de zoekfunctie, of gebruik een uitnodiginslink van een lesgever.",
"teacher": "Geen vakken gevonden. Maak een vak aan met onderstaande knop."
"teacher": "Geen vakken gevonden. Maak een vak aan met onderstaande knop.",
"search": "Geen vakken gevonden voor de gegeven zoekcriteria."
},
"noResults": "Geen resultaten.",
"noIncomingProjects": "Geen projecten met een deadline binnen de 7 dagen.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ onMounted(async () => {
</span>

<!-- Founded courses -->
<CourseGeneralList class="mt-3" :courses="pagination?.results ?? null" :cols="3" />
<CourseGeneralList class="mt-3" :courses="pagination?.results ?? null" :cols="3">
<template #empty>
<p>{{ t('components.list.noCourses.search') }}</p>
</template>
</CourseGeneralList>
</div>
</div>
</BaseLayout>
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/views/courses/search/PublicSearchCourseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ onMounted(async () => {
{{ t('views.courses.search.results', [pagination.count]) }}
</p>

<CourseGeneralList class="mt-3" :courses="pagination?.results ?? null" :cols="3" />
<CourseGeneralList class="mt-3" :courses="pagination?.results ?? null" :cols="3">
<template #empty>
<p>{{ t('components.list.noCourses.search') }}</p>
</template>
</CourseGeneralList>
<Paginator :rows="pageSize" :total-records="pagination?.count" v-model:first="first" />
</div>
Expand Down

0 comments on commit 5b96a53

Please sign in to comment.