]> git.ipfire.org Git - pbs.git/commitdiff
packages: Fix rendering page and fetch builds manually
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 22 Jan 2025 14:41:27 +0000 (14:41 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 22 Jan 2025 14:41:27 +0000 (14:41 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/packages/show.html

index 96047007cc551abf3c12457e4129825a72ab5795..6ff9b8aa4238b9c72e64634f5f491466d259a7ee 100644 (file)
@@ -33,6 +33,9 @@
                </div>
        </section>
 
+       {# Fetch all builds #}
+       {% set builds = package.get_builds() %}
+
        <section class="section">
                <div class="container">
                        <div class="buttons">
@@ -42,7 +45,7 @@
                                </a>
 
                                {# Dropdown with all Builds #}
-                               {% if package.builds %}
+                               {% if builds %}
                                        <div class="dropdown">
                                                <div class="dropdown-trigger">
                                                        <button class="button is-light" aria-haspopup="true" aria-controls="dropdown-builds">
@@ -54,9 +57,9 @@
                                                </div>
                                                <div class="dropdown-menu" id="dropdown-builds" role="menu">
                                                        <div class="dropdown-content">
-                                                               {% for build in package.builds %}
+                                                               {% for build in builds %}
                                                                        <a href="/builds/{{ build.uuid }}" class="dropdown-item">
-                                                                               {{ _("Build from %s") % locale.format_date(build.created_at) }}
+                                                                               {{ _("Build from %s") % build.created_at | format_date }}
                                                                        </a>
                                                                {% endfor %}
                                                        </div>