From 939f20709f573771f10f544d1eb1416938ffd6db Mon Sep 17 00:00:00 2001 From: Xu Date: Tue, 17 May 2022 18:32:06 +0200 Subject: [PATCH] fixed unanswered questions link and added links to design page alerts --- includes/sys_menu.php | 2 +- resources/views/macros/base.twig | 10 ++++++++-- resources/views/pages/design.twig | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/includes/sys_menu.php b/includes/sys_menu.php index 510cb11e..0d653b2f 100644 --- a/includes/sys_menu.php +++ b/includes/sys_menu.php @@ -239,7 +239,7 @@ function admin_new_questions() return null; } - return '' + return '' . __('There are unanswered questions!') . ''; } diff --git a/resources/views/macros/base.twig b/resources/views/macros/base.twig index 6e324bcd..ffd9da76 100644 --- a/resources/views/macros/base.twig +++ b/resources/views/macros/base.twig @@ -6,8 +6,14 @@ {% endmacro %} -{% macro alert(message, type) %} -
{{ message }}
+{% macro alert(message, type, raw) %} +
+ {%- if raw|default(false) -%} + {{ message|raw }} + {%- else -%} + {{ message }} + {%- endif -%} +
{% endmacro %} {% macro user(user) %} diff --git a/resources/views/pages/design.twig b/resources/views/pages/design.twig index 3afb13ff..dd3b8c99 100644 --- a/resources/views/pages/design.twig +++ b/resources/views/pages/design.twig @@ -174,7 +174,7 @@ {% for color in colors %}

{{ color|capitalize }}

- {{ m.alert(lipsum, color) }} + {{ m.alert(linksum, color, true) }}
{% endfor %}