Merge pull request #2458 from crazyserver/MOBILE-3485

MOBILE-3485 tag: Show empty results on tag areas
main
Juan Leyva 2020-07-15 15:01:37 +02:00 committed by GitHub
commit 7230a59635
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 2 deletions

View File

@ -1557,6 +1557,7 @@
"core.errorsomedatanotdownloaded": "local_moodlemobileapp", "core.errorsomedatanotdownloaded": "local_moodlemobileapp",
"core.errorsync": "local_moodlemobileapp", "core.errorsync": "local_moodlemobileapp",
"core.errorsyncblocked": "local_moodlemobileapp", "core.errorsyncblocked": "local_moodlemobileapp",
"core.errorurlschemeinvalidsite": "local_moodlemobileapp",
"core.explanationdigitalminor": "moodle", "core.explanationdigitalminor": "moodle",
"core.favourites": "moodle", "core.favourites": "moodle",
"core.filename": "repository", "core.filename": "repository",
@ -2096,6 +2097,7 @@
"core.tag.errorareanotsupported": "local_moodlemobileapp", "core.tag.errorareanotsupported": "local_moodlemobileapp",
"core.tag.inalltagcoll": "tag", "core.tag.inalltagcoll": "tag",
"core.tag.itemstaggedwith": "tag", "core.tag.itemstaggedwith": "tag",
"core.tag.noresultsfor": "tag",
"core.tag.notagsfound": "tag", "core.tag.notagsfound": "tag",
"core.tag.searchtags": "tag", "core.tag.searchtags": "tag",
"core.tag.showingfirsttags": "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.errorareanotsupported": "This tag area is not supported by the app.",
"core.tag.inalltagcoll": "Everywhere", "core.tag.inalltagcoll": "Everywhere",
"core.tag.itemstaggedwith": "{{$a.tagarea}} tagged with \"{{$a.tag}}\"", "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.notagsfound": "No tags matching \"{{$a}}\" found",
"core.tag.searchtags": "Search tags", "core.tag.searchtags": "Search tags",
"core.tag.showingfirsttags": "Showing {{$a}} most popular tags", "core.tag.showingfirsttags": "Showing {{$a}} most popular tags",

View File

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

View File

@ -9,7 +9,7 @@
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content> <ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
</ion-refresher> </ion-refresher>
<core-loading [hideUntil]="loaded"> <core-loading [hideUntil]="loaded">
<ion-list> <ion-list *ngIf="hasUnsupportedAreas || areas">
<ion-item text-wrap *ngIf="hasUnsupportedAreas" class="core-warning-item"> <ion-item text-wrap *ngIf="hasUnsupportedAreas" class="core-warning-item">
<ion-icon item-start name="warning" color="warning"></ion-icon> <ion-icon item-start name="warning" color="warning"></ion-icon>
{{ 'core.tag.warningareasnotsupported' | translate }} {{ 'core.tag.warningareasnotsupported' | translate }}
@ -19,6 +19,7 @@
<ion-badge item-end *ngIf="area.badge">{{ area.badge }}</ion-badge> <ion-badge item-end *ngIf="area.badge">{{ area.badge }}</ion-badge>
</a> </a>
</ion-list> </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> </core-loading>
</ion-content> </ion-content>
</core-split-view> </core-split-view>

View File

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