File tree 1 file changed +13
-23
lines changed
readthedocsext/theme/templates/includes/utils
1 file changed +13
-23
lines changed Original file line number Diff line number Diff line change 2
2
3
3
{% comment %}
4
4
This template is used by the base template to provide a list of messages on
5
- the top of the page. If the message has a pk it is a persisent or sticky
6
- message level. Otherwise, Django default level notifications are treated as
5
+ the top of the page. Django default level notifications are treated as
7
6
temporary messages, using SUI toast messages instead of block elements in the
8
7
page content pane.
9
8
{% endcomment %}
10
9
11
10
{% if messages %}
12
11
{% for message in messages %}
13
- {# Message is sticky/persistent, show these like normal. #}
14
- {% if message.pk %}
15
- < div class ="ui message {{ message.tags }} "
16
- data-bind ="message: {dismiss_url: '{% url "message_mark_read " message.pk %}'}">
17
- < i class ="fa-duotone fa-circle-xmark close icon "> </ i >
18
- {{ message }}
19
- </ div >
20
- {% else %}
21
- {% comment %}
22
- This is a little bit of a hack, as toasts are purely JS and don't
23
- require an underlying element. Django messages uses "tags" to specify
24
- info/success/error classes on the messages, which just happen to align
25
- with SUI classes too.
26
- {% endcomment %}
27
- {# fmt:off #}
28
- {% spaceless %}
29
- < div style ="display: none; "
30
- data-bind ="
12
+ {% comment %}
13
+ This is a little bit of a hack, as toasts are purely JS and don't
14
+ require an underlying element. Django messages uses "tags" to specify
15
+ info/success/error classes on the messages, which just happen to align
16
+ with SUI classes too.
17
+ {% endcomment %}
18
+ {# fmt:off #}
19
+ {% spaceless %}
20
+ < div style ="display: none; "
21
+ data-bind ="
31
22
semanticui: {
32
23
toast: {
33
24
message: '{{ message|escapejs }}',
38
29
}
39
30
} ">
40
31
</ div >
41
- {% endspaceless %}
42
- {# fmt:on #}
43
- {% endif %}
32
+ {% endspaceless %}
33
+ {# fmt:on #}
44
34
{% endfor %}
45
35
{% endif %}
You can’t perform that action at this time.
0 commit comments