Skip to content

Commit

Permalink
Use the proper HTML/CSS for user notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Jan 3, 2024
1 parent 30b0830 commit 7d1daee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion readthedocs/core/notifications.py
Expand Up @@ -13,7 +13,7 @@
body=_(
"""
Your primary email address is not verified.
Please <a href="{account_email_url}">verify it here</a>.,
Please <a href="{account_email_url}">verify it here</a>.
"""
),
type=WARNING,
Expand Down
14 changes: 9 additions & 5 deletions readthedocs/templates/base.html
Expand Up @@ -108,11 +108,15 @@
We need to use a CustomUser to have access to "user.notifications"
See https://docs.djangoproject.com/en/4.2/ref/settings/#std-setting-AUTH_USER_MODEL
{% endcomment %}
{% for notification in user_notifications %}
<p class="build-failure">
{{ notification.get_message.get_rendered_body|safe }}
</p>
{% endfor %}
{% if user_notifications %}
<ul class="notifications">
{% for notification in user_notifications %}
<li class="notification">
{{ notification.get_message.get_rendered_body|safe }}
</li>
{% endfor %}
</ul>
{% endif %}

<!-- BEGIN notify -->
{% block notify %}
Expand Down

0 comments on commit 7d1daee

Please sign in to comment.