From 26e3678c75e99c5a86976140c37b1ddb127f93b3 Mon Sep 17 00:00:00 2001 From: Gregoo Date: Fri, 31 Jan 2025 14:54:00 +0100 Subject: [PATCH] Fix print badge for elements no having this field --- templates/macro/badge.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/macro/badge.html b/templates/macro/badge.html index 722a357..3d8a5e2 100644 --- a/templates/macro/badge.html +++ b/templates/macro/badge.html @@ -51,7 +51,9 @@ {% endmacro %} {% macro print(item, solo=false, last=false, header=false) %} + {% if item.fields.print %} {{ badge(url=item.url_for_print(), solo=solo, last=last, color='light border', icon='paint-brush-line', collapsible='Print') }} + {% endif %} {% endmacro %} {% macro set(set, solo=false, last=false, url=None, id=None) %}