MOBILE-3833 myoverview: Change empty state texts

main
Pau Ferrer Ocaña 2022-04-06 16:11:37 +02:00
parent d3abd7176e
commit 9624105319
4 changed files with 41 additions and 9 deletions

View File

@ -40,6 +40,7 @@
"addon.block_learningplans.pluginname": "block_lp",
"addon.block_myoverview.all": "block_myoverview",
"addon.block_myoverview.allincludinghidden": "block_myoverview",
"addon.block_myoverview.browseallcourses": "local_moodlemobileapp",
"addon.block_myoverview.card": "block_myoverview",
"addon.block_myoverview.favourites": "block_myoverview",
"addon.block_myoverview.future": "block_myoverview",
@ -47,7 +48,10 @@
"addon.block_myoverview.inprogress": "block_myoverview",
"addon.block_myoverview.lastaccessed": "block_myoverview",
"addon.block_myoverview.list": "block_myoverview",
"addon.block_myoverview.nocourses": "moodle",
"addon.block_myoverview.nocoursesenrolled": "local_moodlemobileapp",
"addon.block_myoverview.nocoursesenrolleddescription": "local_moodlemobileapp",
"addon.block_myoverview.noresult": "local_moodlemobileapp",
"addon.block_myoverview.noresultdescription": "local_moodlemobileapp",
"addon.block_myoverview.past": "block_myoverview",
"addon.block_myoverview.pluginname": "block_myoverview",
"addon.block_myoverview.shortname": "block_myoverview",

View File

@ -99,13 +99,26 @@
</ion-col>
</ion-row>
<core-empty-box *ngIf="filteredCourses.length == 0" image="assets/img/icons/courses.svg"
[message]="'addon.block_myoverview.nocourses' | translate">
<ion-button *ngIf="searchEnabled" (click)="openSearch()" fill="outline">
<ion-icon name="fas-search" slot="start" aria-hidden="true">
</ion-icon>
{{'core.courses.searchcourses' | translate}}
</ion-button>
<core-empty-box *ngIf="filteredCourses.length == 0" image="assets/img/icons/courses.svg">
<p *ngIf="hasCourses" class="item-heading">
{{'addon.block_myoverview.noresult' | translate}}
</p>
<p *ngIf="!hasCourses" class="item-heading">
{{'addon.block_myoverview.nocoursesenrolled' | translate}}
</p>
<ng-container *ngIf="searchEnabled">
<p *ngIf="hasCourses" class="subdued">
{{'addon.block_myoverview.noresultdescription' | translate}}
</p>
<p *ngIf="!hasCourses" class="subdued">
{{'addon.block_myoverview.nocoursesenrolleddescription' | translate}}
</p>
<ion-button (click)="openSearch()" fill="outline">
<ion-icon name="fas-search" slot="start" aria-hidden="true">
</ion-icon>
{{'addon.block_myoverview.browseallcourses' | translate}}
</ion-button>
</ng-container>
</core-empty-box>
<!-- List of courses. -->

View File

@ -34,4 +34,15 @@
}
}
core-empty-box {
.item-heading {
font-weight: bold;
margin-bottom: 0;
font-size: 16px;
}
.subdued {
color: var(--subdued-text-color);
}
}
}

View File

@ -1,6 +1,7 @@
{
"all": "All",
"allincludinghidden": "All (including archived)",
"browseallcourses": "Browse all courses",
"card": "Card",
"favourites": "Starred",
"future": "Future",
@ -8,7 +9,10 @@
"inprogress": "In progress",
"lastaccessed": "Last accessed",
"list": "List",
"nocourses": "No courses",
"nocoursesenrolled": "You're not enrolled in any courses yet.",
"nocoursesenrolleddescription": "Browse all available courses below and start learning.",
"noresult": "Your search didn't match any courses.",
"noresultdescription": "Try adjusting your filters or browse all courses below.",
"past": "Past",
"pluginname": "Course overview",
"shortname": "Short name",