Add links between detail and update page
All checks were successful
Tests / test (push) Successful in 24s

This commit is contained in:
Tobias Kunze 2025-05-21 09:29:28 +02:00
parent eb4d3f9556
commit 4bb52cda4f
5 changed files with 24 additions and 3 deletions

View file

@ -25,9 +25,13 @@
<div class="content-wrapper container">
<div class="page-heading">
<h3>
{% block page_title %}
Dashboard
{% endblock page_title %}
<span>
{% block page_title %}
Dashboard
{% endblock page_title %}
</span>
{% block page_title_extra %}
{% endblock page_title_extra %}
</h3>
</div>
<div class="page-content">

View file

@ -5,6 +5,11 @@
{{ instance.name }}
{% endblock page_title %}
{% endblock html_title %}
{% block page_title_extra %}
{% if has_change_permission %}
<a href="{{ instance.urls.update }}" class="btn btn-primary me-1 mb-1">{% translate "Edit" %}</a>
{% endif %}
{% endblock page_title_extra %}
{% block content %}
<section class="section">
<div class="row">

View file

@ -9,6 +9,9 @@
{% endblock %}
{% endblock page_title %}
{% endblock html_title %}
{% block page_title_extra %}
<a href="{{ instance.urls.base }}" class="btn btn-secondary me-1 mb-1">{% translate "Back" %}</a>
{% endblock page_title_extra %}
{% partialdef service-form %}
{% if form %}
<div class="card">

View file

@ -209,6 +209,10 @@ class ServiceInstanceDetailView(
context = super().get_context_data(**kwargs)
if self.object.kubernetes_object and self.object.spec:
context["spec_fieldsets"] = self.get_nested_spec()
permission_required = ServiceInstance.get_perm("change")
context["has_change_permission"] = self.request.user.has_perm(
permission_required, self.object
)
return context
def get_nested_spec(self):

View file

@ -85,3 +85,8 @@ html[data-bs-theme="dark"] .btn-outline-primary, .btn-outline-primary {
a.btn-keycloak {
display: inline-flex;
}
.page-heading h3 {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}