MOBILE-3485 tag: Show empty results on tag areas

main
Pau Ferrer Ocaña 2020-07-15 14:46:04 +02:00
parent 7811ab0bb5
commit 536235cf25
5 changed files with 7 additions and 2 deletions

View File

@ -1557,6 +1557,7 @@
"core.errorsomedatanotdownloaded": "local_moodlemobileapp",
"core.errorsync": "local_moodlemobileapp",
"core.errorsyncblocked": "local_moodlemobileapp",
"core.errorurlschemeinvalidsite": "local_moodlemobileapp",
"core.explanationdigitalminor": "moodle",
"core.favourites": "moodle",
"core.filename": "repository",
@ -2096,6 +2097,7 @@
"core.tag.errorareanotsupported": "local_moodlemobileapp",
"core.tag.inalltagcoll": "tag",
"core.tag.itemstaggedwith": "tag",
"core.tag.noresultsfor": "tag",
"core.tag.notagsfound": "tag",
"core.tag.searchtags": "tag",
"core.tag.showingfirsttags": "tag",

View File

@ -2097,6 +2097,7 @@
"core.tag.errorareanotsupported": "This tag area is not supported by the app.",
"core.tag.inalltagcoll": "Everywhere",
"core.tag.itemstaggedwith": "{{$a.tagarea}} tagged with \"{{$a.tag}}\"",
"core.tag.noresultsfor": "No results for \"{{$a}}\"",
"core.tag.notagsfound": "No tags matching \"{{$a}}\" found",
"core.tag.searchtags": "Search tags",
"core.tag.showingfirsttags": "Showing {{$a}} most popular tags",

View File

@ -4,6 +4,7 @@
"inalltagcoll": "Everywhere",
"itemstaggedwith": "{{$a.tagarea}} tagged with \"{{$a.tag}}\"",
"notagsfound": "No tags matching \"{{$a}}\" found",
"noresultsfor": "No results for \"{{$a}}\"",
"searchtags": "Search tags",
"showingfirsttags": "Showing {{$a}} most popular tags",
"tag": "Tag",

View File

@ -9,7 +9,7 @@
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
</ion-refresher>
<core-loading [hideUntil]="loaded">
<ion-list>
<ion-list *ngIf="hasUnsupportedAreas || areas">
<ion-item text-wrap *ngIf="hasUnsupportedAreas" class="core-warning-item">
<ion-icon item-start name="warning" color="warning"></ion-icon>
{{ 'core.tag.warningareasnotsupported' | translate }}
@ -19,6 +19,7 @@
<ion-badge item-end *ngIf="area.badge">{{ area.badge }}</ion-badge>
</a>
</ion-list>
<core-empty-box icon="fa-tag" *ngIf="!hasUnsupportedAreas && (!areas || !areas.length)" [message]="'core.tag.noresultsfor' | translate: { $a: tagName }"></core-empty-box>
</core-loading>
</ion-content>
</core-split-view>

View File

@ -166,7 +166,7 @@ export class CoreTagProvider {
return Promise.reject(error);
}).then((response) => {
if (!response || !response.length) {
if (!response) {
return Promise.reject(null);
}