Skip to content

Commit 7230a59

Browse files
authored
Merge pull request #2458 from crazyserver/MOBILE-3485
MOBILE-3485 tag: Show empty results on tag areas
2 parents 7811ab0 + 536235c commit 7230a59

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

scripts/langindex.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,6 +1557,7 @@
15571557
"core.errorsomedatanotdownloaded": "local_moodlemobileapp",
15581558
"core.errorsync": "local_moodlemobileapp",
15591559
"core.errorsyncblocked": "local_moodlemobileapp",
1560+
"core.errorurlschemeinvalidsite": "local_moodlemobileapp",
15601561
"core.explanationdigitalminor": "moodle",
15611562
"core.favourites": "moodle",
15621563
"core.filename": "repository",
@@ -2096,6 +2097,7 @@
20962097
"core.tag.errorareanotsupported": "local_moodlemobileapp",
20972098
"core.tag.inalltagcoll": "tag",
20982099
"core.tag.itemstaggedwith": "tag",
2100+
"core.tag.noresultsfor": "tag",
20992101
"core.tag.notagsfound": "tag",
21002102
"core.tag.searchtags": "tag",
21012103
"core.tag.showingfirsttags": "tag",

src/assets/lang/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,6 +2097,7 @@
20972097
"core.tag.errorareanotsupported": "This tag area is not supported by the app.",
20982098
"core.tag.inalltagcoll": "Everywhere",
20992099
"core.tag.itemstaggedwith": "{{$a.tagarea}} tagged with \"{{$a.tag}}\"",
2100+
"core.tag.noresultsfor": "No results for \"{{$a}}\"",
21002101
"core.tag.notagsfound": "No tags matching \"{{$a}}\" found",
21012102
"core.tag.searchtags": "Search tags",
21022103
"core.tag.showingfirsttags": "Showing {{$a}} most popular tags",

src/core/tag/lang/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"inalltagcoll": "Everywhere",
55
"itemstaggedwith": "{{$a.tagarea}} tagged with \"{{$a.tag}}\"",
66
"notagsfound": "No tags matching \"{{$a}}\" found",
7+
"noresultsfor": "No results for \"{{$a}}\"",
78
"searchtags": "Search tags",
89
"showingfirsttags": "Showing {{$a}} most popular tags",
910
"tag": "Tag",

src/core/tag/pages/index/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
1010
</ion-refresher>
1111
<core-loading [hideUntil]="loaded">
12-
<ion-list>
12+
<ion-list *ngIf="hasUnsupportedAreas || areas">
1313
<ion-item text-wrap *ngIf="hasUnsupportedAreas" class="core-warning-item">
1414
<ion-icon item-start name="warning" color="warning"></ion-icon>
1515
{{ 'core.tag.warningareasnotsupported' | translate }}
@@ -19,6 +19,7 @@ <h2>{{ area.nameKey | translate }}</h2>
1919
<ion-badge item-end *ngIf="area.badge">{{ area.badge }}</ion-badge>
2020
</a>
2121
</ion-list>
22+
<core-empty-box icon="fa-tag" *ngIf="!hasUnsupportedAreas && (!areas || !areas.length)" [message]="'core.tag.noresultsfor' | translate: { $a: tagName }"></core-empty-box>
2223
</core-loading>
2324
</ion-content>
2425
</core-split-view>

src/core/tag/providers/tag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export class CoreTagProvider {
166166

167167
return Promise.reject(error);
168168
}).then((response) => {
169-
if (!response || !response.length) {
169+
if (!response) {
170170
return Promise.reject(null);
171171
}
172172

0 commit comments

Comments
 (0)