Add breadcrumb to more details pages

This patch adds basic Breadcrumb nav to the detail pages for Data
Processing, Databases, Metadata Definitions and Routers.

Change-Id: I114e93799b957db39cbe0d4e49d3e6869bc9d92d
Partial-Bug: 1413823
This commit is contained in:
Rob Cresswell 2015-09-24 12:26:38 +01:00
parent d02c92dcfa
commit 67304ace38
13 changed files with 14 additions and 42 deletions

@ -1,10 +1,6 @@
{% load i18n sizeformat %}
<h3>{% trans "Cluster Overview" %}</h3>
<div class="status row detail">
<h4>{% trans "Information" %}</h4>
<hr class="header_rule">
<div class="detail">
<dl class="dl-horizontal">
<dt>{% trans "Name" %}</dt>
<dd>{{ cluster.name }}</dd>

@ -2,7 +2,6 @@
{% load i18n sizeformat %}
{% block connection_info %}
<div class="addresses row detail">
<h4>{% trans "Connection Information" %}</h4>
<hr class="header_rule">
<dl>
@ -23,5 +22,4 @@
{% endif %} <!-- ends else block -->
{% endwith %}
</dl>
</div>
{% endblock %}

@ -1,10 +1,6 @@
{% load i18n sizeformat %}
<h3>{% trans "Cluster Overview" %}</h3>
<div class="status row detail">
<h4>{% trans "Information" %}</h4>
<hr class="header_rule">
<div class="detail">
<dl class="dl-horizontal">
<dt>{% trans "Name" %}</dt>
<dd>{{ cluster.name }}</dd>

@ -291,5 +291,5 @@ class ClustersTests(test.TestCase):
details_url = reverse('horizon:project:database_clusters:detail',
args=[cluster.id])
res = self.client.get(details_url)
self.assertTemplateUsed(res, 'project/database_clusters/detail.html')
self.assertTemplateUsed(res, 'horizon/common/_detail.html')
self.assertContains(res, cluster.ip[0])

@ -97,12 +97,12 @@ class LaunchClusterView(horizon_forms.ModalFormView):
class DetailView(horizon_tabs.TabbedTableView):
tab_group_class = tabs.ClusterDetailTabs
template_name = 'project/database_clusters/detail.html'
page_title = _("Cluster Details: {{ cluster.name }}")
template_name = 'horizon/common/_detail.html'
page_title = "{{ cluster.name|default:cluster.id }}"
def get_context_data(self, **kwargs):
context = super(DetailView, self).get_context_data(**kwargs)
context["url"] = reverse('horizon:project:database_clusters:index')
context["cluster"] = self.get_data()
return context

@ -1,11 +1,7 @@
{% load i18n sizeformat %}
{% load url from future %}
<h3>{% trans "Instance Overview" %}</h3>
<div class="status row detail">
<h4>{% trans "Information" %}</h4>
<hr class="header_rule">
<div class="detail">
<dl class="dl-horizontal">
<dt>{% trans "Name" %}</dt>
<dd>{{ instance.name }}</dd>
@ -18,9 +14,7 @@
<dt>{% trans "Status" %}</dt>
<dd>{{ instance.status|title }}</dd>
</dl>
</div>
<div class="specs row detail">
<h4>{% trans "Specs" %}</h4>
<hr class="header_rule">
<dl class="dl-horizontal">
@ -37,13 +31,11 @@
<dt>{% trans "Updated" %}</dt>
<dd>{{ instance.updated|parse_isotime }}</dd>
</dl>
</div>
{% block connection_info %}
{% endblock %}
{% if instance.replica_of or instance.replicas %}
<div class="specs row detail">
<h4>{% trans "Replication" %}</h4>
<hr class="header_rule">
<dl>
@ -65,5 +57,5 @@
{% endfor %}
{% endif %}
</dl>
</div>
{% endif %}
</div>

@ -2,7 +2,6 @@
{% load i18n sizeformat %}
{% block connection_info %}
<div class="addresses row detail">
<h4>{% trans "Connection Information" %}</h4>
<hr class="header_rule">
<dl class="dl-horizontal">
@ -19,5 +18,4 @@
{% endif %} <!-- ends else block -->
{% endwith %}
</dl>
</div>
{% endblock %}

@ -2,7 +2,6 @@
{% load i18n sizeformat %}
{% block connection_info %}
<div class="addresses row detail">
<h4>{% trans "Connection Info" %}</h4>
<hr class="header_rule">
<dl class="dl-horizontal">
@ -17,5 +16,4 @@
{% endif %} <!-- ends else block -->
{% endwith %}
</dl>
</div>
{% endblock %}
{% endblock %}

@ -2,7 +2,6 @@
{% load i18n sizeformat %}
{% block connection_info %}
<div class="addresses row detail">
<h4>{% trans "Connection Information" %}</h4>
<hr class="header_rule">
<dl class="dl-horizontal">
@ -28,5 +27,4 @@
{% endwith %}
</dl>
{% endif %}
</div>
{% endblock %}

@ -2,7 +2,6 @@
{% load i18n sizeformat %}
{% block connection_info %}
<div class="addresses row detail">
<h4>{% trans "Connection Info" %}</h4>
<hr class="header_rule">
<dl class="dl-horizontal">
@ -20,5 +19,4 @@
{% endif %} <!-- ends else block -->
{% endwith %}
</dl>
</div>
{% endblock %}
{% endblock %}

@ -2,7 +2,6 @@
{% load i18n sizeformat %}
{% block connection_info %}
<div class="addresses row detail">
<h4>{% trans "Connection Info" %}</h4>
<hr class="header_rule">
<dl class="dl-horizontal">
@ -17,5 +16,4 @@
{% endif %} <!-- ends else block -->
{% endwith %}
</dl>
</div>
{% endblock %}
{% endblock %}

@ -317,7 +317,7 @@ class DatabaseTests(test.TestCase):
self.mox.ReplayAll()
res = self.client.get(DETAILS_URL)
self.assertTemplateUsed(res, 'project/databases/detail.html')
self.assertTemplateUsed(res, 'horizon/common/_detail.html')
if with_designate:
self.assertContains(res, database.hostname)
else:

@ -100,8 +100,8 @@ class LaunchInstanceView(horizon_workflows.WorkflowView):
class DetailView(horizon_tabs.TabbedTableView):
tab_group_class = tabs.InstanceDetailTabs
template_name = 'project/databases/detail.html'
page_title = _("Instance Details: {{ instance.name }}")
template_name = 'horizon/common/_detail.html'
page_title = _("{{ instance.name }}")
def get_context_data(self, **kwargs):
context = super(DetailView, self).get_context_data(**kwargs)