From e93c5706e8b4f849ffaf3dad921b84eb453b27b5 Mon Sep 17 00:00:00 2001 From: Ekaterina Chernova Date: Wed, 22 Jul 2015 18:40:06 +0300 Subject: [PATCH] Update message about apps absence Previously, message about importing apps from the app catalog shown after app searching and category browsing. Now this message was updated to the valid one. This is a cherry-pick from Ibccf0d503fb75789d094f99eb360ccebc20f164e Change-Id: I4761ba10627bc8b50d3bdc320eea9af632f721bc Closes-Bug: #1466382 --- muranodashboard/catalog/views.py | 3 +++ muranodashboard/templates/catalog/index.html | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/muranodashboard/catalog/views.py b/muranodashboard/catalog/views.py index b1af6b319..37084ce10 100644 --- a/muranodashboard/catalog/views.py +++ b/muranodashboard/catalog/views.py @@ -548,6 +548,9 @@ class IndexView(list_view.ListView): context.update(get_environments_context(self.request)) context['repo_url'] = pkg_consts.MURANO_REPO_URL context['pkg_def_url'] = reverse('horizon:murano:packages:index') + context['no_apps'] = True + if self.get_current_category() != ALL_CATEGORY_NAME or search: + context['no_apps'] = False return context diff --git a/muranodashboard/templates/catalog/index.html b/muranodashboard/templates/catalog/index.html index 115590b02..b6c2e878d 100644 --- a/muranodashboard/templates/catalog/index.html +++ b/muranodashboard/templates/catalog/index.html @@ -102,6 +102,7 @@ {% else %}

+ {% if no_apps %} {% blocktrans %} There are no applications in the catalog. You can import apps from {{ repo_url }}. @@ -110,6 +111,10 @@ Package Definitions, click 'Import Package' and select Repository as a Package Source. {% endblocktrans %} + {% else %} + {% blocktrans %} No applications matching your criteria. + {% endblocktrans %} + {% endif %}

{% endif %}