Skip to content

Commit 7d1daee

Browse files
committed
Use the proper HTML/CSS for user notifications
1 parent 30b0830 commit 7d1daee

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

readthedocs/core/notifications.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
body=_(
1414
"""
1515
Your primary email address is not verified.
16-
Please <a href="{account_email_url}">verify it here</a>.,
16+
Please <a href="{account_email_url}">verify it here</a>.
1717
"""
1818
),
1919
type=WARNING,

readthedocs/templates/base.html

+9-5
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,15 @@
108108
We need to use a CustomUser to have access to "user.notifications"
109109
See https://docs.djangoproject.com/en/4.2/ref/settings/#std-setting-AUTH_USER_MODEL
110110
{% endcomment %}
111-
{% for notification in user_notifications %}
112-
<p class="build-failure">
113-
{{ notification.get_message.get_rendered_body|safe }}
114-
</p>
115-
{% endfor %}
111+
{% if user_notifications %}
112+
<ul class="notifications">
113+
{% for notification in user_notifications %}
114+
<li class="notification">
115+
{{ notification.get_message.get_rendered_body|safe }}
116+
</li>
117+
{% endfor %}
118+
</ul>
119+
{% endif %}
116120

117121
<!-- BEGIN notify -->
118122
{% block notify %}

0 commit comments

Comments
 (0)