From 536235cf25611f5ba26d261cf393368270825cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 15 Jul 2020 14:46:04 +0200 Subject: [PATCH] MOBILE-3485 tag: Show empty results on tag areas --- scripts/langindex.json | 2 ++ src/assets/lang/en.json | 1 + src/core/tag/lang/en.json | 1 + src/core/tag/pages/index/index.html | 3 ++- src/core/tag/providers/tag.ts | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/langindex.json b/scripts/langindex.json index 2a5ecb26b..fe23eb125 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -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", diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json index 22e7bc534..93dcadfc1 100644 --- a/src/assets/lang/en.json +++ b/src/assets/lang/en.json @@ -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", diff --git a/src/core/tag/lang/en.json b/src/core/tag/lang/en.json index c23afc5e9..b94bad4fd 100644 --- a/src/core/tag/lang/en.json +++ b/src/core/tag/lang/en.json @@ -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", diff --git a/src/core/tag/pages/index/index.html b/src/core/tag/pages/index/index.html index 5174fcd7c..4eb589d90 100644 --- a/src/core/tag/pages/index/index.html +++ b/src/core/tag/pages/index/index.html @@ -9,7 +9,7 @@ - + {{ 'core.tag.warningareasnotsupported' | translate }} @@ -19,6 +19,7 @@ {{ area.badge }} + diff --git a/src/core/tag/providers/tag.ts b/src/core/tag/providers/tag.ts index fc208a2c1..e7dd17f67 100644 --- a/src/core/tag/providers/tag.ts +++ b/src/core/tag/providers/tag.ts @@ -166,7 +166,7 @@ export class CoreTagProvider { return Promise.reject(error); }).then((response) => { - if (!response || !response.length) { + if (!response) { return Promise.reject(null); }