fixed unanswered questions link and added links to design page alerts

This commit is contained in:
Xu 2022-05-17 18:32:06 +02:00 committed by Igor Scheller
parent 25e28535d0
commit 939f20709f
3 changed files with 10 additions and 4 deletions

View File

@ -239,7 +239,7 @@ function admin_new_questions()
return null; return null;
} }
return '<a class="text-info" href="' . page_link_to('/admin/questions') . '">' return '<a href="' . page_link_to('/admin/questions') . '">'
. __('There are unanswered questions!') . __('There are unanswered questions!')
. '</a>'; . '</a>';
} }

View File

@ -6,8 +6,14 @@
<span class="bi bi-{{ icon }} {% if color %} text-{{ color }} {% endif %}"></span> <span class="bi bi-{{ icon }} {% if color %} text-{{ color }} {% endif %}"></span>
{% endmacro %} {% endmacro %}
{% macro alert(message, type) %} {% macro alert(message, type, raw) %}
<div class="alert alert-{{ type|default('info') }}">{{ message }}</div> <div class="alert alert-{{ type|default('info') }}">
{%- if raw|default(false) -%}
{{ message|raw }}
{%- else -%}
{{ message }}
{%- endif -%}
</div>
{% endmacro %} {% endmacro %}
{% macro user(user) %} {% macro user(user) %}

View File

@ -174,7 +174,7 @@
{% for color in colors %} {% for color in colors %}
<div class="col"> <div class="col">
<h4>{{ color|capitalize }}</h4> <h4>{{ color|capitalize }}</h4>
{{ m.alert(lipsum, color) }} {{ m.alert(linksum, color, true) }}
</div> </div>
{% endfor %} {% endfor %}
</div> </div>