]> git.ipfire.org Git - pbs.git/blobdiff - src/templates/modules/changelog/entry.html
bootstrap4: rework changelog
[pbs.git] / src / templates / modules / changelog / entry.html
index 511a0a90c791757107d211fbb2c61d8acdc2c529..08e4a49555f9777fe30279d732cf055f0d27c43e 100644 (file)
@@ -1,36 +1,43 @@
 <div class="card mb-3
-               {% if build.type == "release" and build.repo.type == "stable" %}
-                       border-success
-               {% elif build.type == "release" and build.repo.type == "unstable" %}
-                       border-warning
-               {% elif build.type == "release" and build.repo.type == "testing" %}
-                       border-danger
+               {% if build.type == "release" and build.repo %}
+                       {% if build.repo.type == "stable" %}
+                               border-success
+                       {% elif  build.repo.type == "unstable" %}
+                               border-danger
+                       {% elif build.repo.type == "testing" %}
+                               border-warning
+                       {% end %}
                {% elif build.type == "scratch" %}
-                       border-danger
-               {% end %}" style="width:100%;">
-               <div class="card-header
+                       border-secondary
+               {% end %}
+       "
+       style="width:100%;">
                {% if build.type == "release" and build.repo %}
                        {% if build.repo.type == "stable" %}
-                               text-success">
-                               <a href="/distro/{{ build.repo.distro.identifier }}/repo/{{ build.repo.name }}">
-                                       {{ build.repo.distro.name }} &dash; {{ build.repo.name }}
-                               </a>
+                               <div class="card-header text-success">
+                                       <a href="/distro/{{ build.repo.distro.identifier }}/repo/{{ build.repo.name }}">
+                                               {{ build.repo.distro.name }} &dash; {{ build.repo.name }}
+                                       </a>
+                               </div>
                        {% elif build.repo.type == "unstable" %}
-                               text-warning">
-                               <a href="/distro/{{ build.repo.distro.identifier }}/repo/{{ build.repo.name }}">
-                                       {{ build.repo.distro.name }} &dash; {{ build.repo.name }}
-                               </a>
+                               <div class="card-header text-danger">
+                                       <a href="/distro/{{ build.repo.distro.identifier }}/repo/{{ build.repo.name }}">
+                                               {{ build.repo.distro.name }} &dash; {{ build.repo.name }}
+                                       </a>
+                               </div>
                        {% elif build.repo.type == "testing" %}
-                               text-danger">
-                               <a href="/distro/{{ build.repo.distro.identifier }}/repo/{{ build.repo.name }}">
-                                       {{ build.repo.distro.name }} &dash; {{ build.repo.name }}
-                               </a>
+                               <div class="card-header text-warning">
+                                       <a href="/distro/{{ build.repo.distro.identifier }}/repo/{{ build.repo.name }}">
+                                               {{ build.repo.distro.name }} &dash; {{ build.repo.name }}
+                                       </a>
+                               </div>
                        {% end %}
                {% elif build.type == "scratch" %}
-                       text-secondary">
-                       {{ _("Scratch build") }}
+                       <div class="card-header text-secondary">
+                               {{ _("Scratch build") }}
+                       </div>
                {% end %}
-               </div>
+
                <div class="card-body">
                        <h4 class="card-title">
                                <a href="/build/{{ build.uuid }}">