From 053085b52278d1149965ceb22da2e16206eedf94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dylan=20A=C3=AFssi?= <dylan.aissi@collabora.com>
Date: Thu, 11 Jul 2024 17:47:12 +0200
Subject: [PATCH] Reorganize buttons to avoid breaking the structure
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
---
 templates/base.html.jinja2  |  4 ++++
 templates/index.html.jinja2 | 10 ++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/templates/base.html.jinja2 b/templates/base.html.jinja2
index 05b4f4e..b908998 100644
--- a/templates/base.html.jinja2
+++ b/templates/base.html.jinja2
@@ -49,6 +49,10 @@
         {% block summary %}{% endblock %}
       </div>
 
+      <div class="d-flex align-items-baseline justify-content-between">
+        {% block buttons %}{% endblock %}
+      </div>
+
       <div class="d-flex align-items-baseline justify-content-between">
         {% block error %}{% endblock %}
       </div>
diff --git a/templates/index.html.jinja2 b/templates/index.html.jinja2
index 236430c..47de1ad 100644
--- a/templates/index.html.jinja2
+++ b/templates/index.html.jinja2
@@ -184,9 +184,11 @@
       </div>
     </div>
   </ul>
+{% endblock %}
 
-  <div>
-    {% if meta.new_pipeline_url -%}
+{% block buttons %}
+  {% if meta.new_pipeline_url -%}
+  <ul class="list-inline mr-auto">
     <a class="btn btn-primary {{'disabled' if not summary.wrong_settings_count }}"
         href="{{- meta.new_pipeline_url -}}&amp;var[TRIGGER_GITLAB_RULEZ]=apply
       ">Run gitlab-rulez</a>
@@ -202,8 +204,8 @@
       &amp;var[TRIGGER_FROM_JOB]={{- meta.current_job_url -}}
       {%- endif -%}
       ">Update security</a>
-    {%- endif %}
-  </div>
+  </ul>
+  {%- endif %}
 {% endblock %}
 
 {% block error %}
-- 
GitLab