From 5d07abcb9cc580719f74fea3164fd6e0759134d0 Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Wed, 11 May 2016 15:28:22 +0800 Subject: [PATCH] Add page_title in breadcrumb for Browse page Because there is no page_title setting for Browse page, it shows 'None' in breadcrumb. So added page_title for it and application detail view. Change-Id: I8dea2cdf682ddd615a8dcc37154fc3d90df5c12b Closes-Bug: #1580471 --- muranodashboard/catalog/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/muranodashboard/catalog/views.py b/muranodashboard/catalog/views.py index eacbd3891..3ce1f4d69 100644 --- a/muranodashboard/catalog/views.py +++ b/muranodashboard/catalog/views.py @@ -40,6 +40,7 @@ from horizon import exceptions from horizon.forms import views from horizon import messages from horizon import tabs +from horizon import views as generic_views from oslo_log import log as logging import six @@ -464,8 +465,9 @@ class Wizard(views.ModalFormMixin, LazyWizard): return context -class IndexView(list_view.ListView): +class IndexView(generic_views.PageTitleMixin, list_view.ListView): paginate_by = 6 + page_title = _("Browse") def __init__(self, **kwargs): super(IndexView, self).__init__(**kwargs) @@ -607,6 +609,7 @@ class IndexView(list_view.ListView): class AppDetailsView(tabs.TabView): tab_group_class = catalog_tabs.ApplicationTabs template_name = 'catalog/app_details.html' + page_title = '{{ app.name }}' app = None