From bf8f8702de67e33f19720dc86414cc88f9a42c69 Mon Sep 17 00:00:00 2001 From: kenji-ishii Date: Fri, 4 Dec 2015 19:41:24 +0900 Subject: [PATCH] Display user's description in user detail In the case of using keystone v3, user's description is displayed in user list, but it is not displayed in user detail. I think we should display just like a user list. Change-Id: I113a8e5060481b6715acfa936c21ebdc0f4aae29 Closes-Bug: #1522655 --- .../identity/users/templates/users/_detail_overview.html | 4 ++++ openstack_dashboard/dashboards/identity/users/views.py | 1 + 2 files changed, 5 insertions(+) diff --git a/openstack_dashboard/dashboards/identity/users/templates/users/_detail_overview.html b/openstack_dashboard/dashboards/identity/users/templates/users/_detail_overview.html index 06033695d1..e8a2f81539 100644 --- a/openstack_dashboard/dashboards/identity/users/templates/users/_detail_overview.html +++ b/openstack_dashboard/dashboards/identity/users/templates/users/_detail_overview.html @@ -12,6 +12,10 @@ {% endif %}
{% trans "User Name" %}
{{ user.name }}
+ {% if description %} +
{% trans "Description" %}
+
{{ description }}
+ {% endif %}
{% trans "ID" %}
{{ user.id }}
{% trans "Email" %}
diff --git a/openstack_dashboard/dashboards/identity/users/views.py b/openstack_dashboard/dashboards/identity/users/views.py index 52f7658e7b..5eae45d651 100644 --- a/openstack_dashboard/dashboards/identity/users/views.py +++ b/openstack_dashboard/dashboards/identity/users/views.py @@ -181,6 +181,7 @@ class DetailView(views.HorizonTemplateView): except Exception: exceptions.handle(self.request, _('Unable to retrieve project domain.')) + context["description"] = getattr(user, "description", _("None")) context["user"] = user if tenant: