From bca79be02a28f0a0c6bcb024013051bd6599bba8 Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Fri, 24 Oct 2025 11:55:56 +0200 Subject: [PATCH] Inline user info in service offering page ref #243 --- .../service_instance_detail.html | 11 ++++++- .../service_offering_detail.html | 27 ++++++++------- .../includes/control_plane_user_info.html | 33 +++++++------------ 3 files changed, 37 insertions(+), 34 deletions(-) diff --git a/src/servala/frontend/templates/frontend/organizations/service_instance_detail.html b/src/servala/frontend/templates/frontend/organizations/service_instance_detail.html index d375344..4f0f00e 100644 --- a/src/servala/frontend/templates/frontend/organizations/service_instance_detail.html +++ b/src/servala/frontend/templates/frontend/organizations/service_instance_detail.html @@ -102,7 +102,16 @@ {% endif %} - {% include "includes/control_plane_user_info.html" with control_plane=instance.context.control_plane %} + {% if control_plane.user_info %} +
+
+

{% translate "Service Provider Zone Information" %}

+
+
+ {% include "includes/control_plane_user_info.html" with control_plane=instance.context.control_plane %} +
+
+ {% endif %} {% if instance.spec and spec_fieldsets %}
diff --git a/src/servala/frontend/templates/frontend/organizations/service_offering_detail.html b/src/servala/frontend/templates/frontend/organizations/service_offering_detail.html index 842e610..df57811 100644 --- a/src/servala/frontend/templates/frontend/organizations/service_offering_detail.html +++ b/src/servala/frontend/templates/frontend/organizations/service_offering_detail.html @@ -7,9 +7,14 @@ {{ offering }} {% endblock page_title %} {% endblock html_title %} -{% partialdef control-plane-info %} -{% if selected_plane %} - {% include "includes/control_plane_user_info.html" with control_plane=selected_plane %} +{% partialdef control-plane-info inline=True %} +{% if selected_plane and selected_plane.user_info %} +
+
+
{% translate "Service Provider Zone Information" %}
+ {% include "includes/control_plane_user_info.html" with control_plane=selected_plane %} +
+
{% endif %} {% endpartialdef %} {% partialdef service-form %} @@ -31,7 +36,7 @@ {% block content %}
-
+
{% if service.logo %} @@ -64,6 +69,13 @@ {{ select_form }} {% endif %} + {% if has_control_planes %} +
+ {% partial control-plane-info %} +
+ {% endif %} {% if service.external_links or offering.external_links %}
@@ -83,13 +95,6 @@
{% partial service-form %}
-
- {% if has_control_planes %} -
{% partial control-plane-info %}
- {% endif %} -
{% endblock content %} diff --git a/src/servala/frontend/templates/includes/control_plane_user_info.html b/src/servala/frontend/templates/includes/control_plane_user_info.html index b9ffe99..e8fcee8 100644 --- a/src/servala/frontend/templates/includes/control_plane_user_info.html +++ b/src/servala/frontend/templates/includes/control_plane_user_info.html @@ -1,26 +1,15 @@ {% load i18n %} -{% comment %} -Reusable snippet for displaying ControlPlane user_info -Usage: {% include "includes/control_plane_user_info.html" with control_plane=control_plane_object %} -{% endcomment %} {% if control_plane.user_info %} -
-
-

{% translate "Service Provider Zone Information" %}

-
-
-
- - - {% for key, value in control_plane.user_info.items %} - - - - - {% endfor %} - -
{{ key }}{{ value }}
-
-
+
+ + + {% for key, value in control_plane.user_info.items %} + + + + + {% endfor %} + +
{{ key }}{{ value }}
{% endif %}