Change notification backend

This commit is contained in:
cuom1999 2023-10-10 17:38:48 -05:00
parent 5f97491f0d
commit 7f854c40dd
15 changed files with 188 additions and 134 deletions

View file

@ -1,11 +1,8 @@
{% extends "base.html" %}
{% block body %}
{% if not has_notifications %}
<h2 style="text-align: center;">{{ _('You have no notifications') }}</h2>
{% else %}
<table class="table">
<tr>
@ -17,24 +14,15 @@
{% for notification in notifications %}
<tr class="{{ 'highlight' if not notification.seen }}">
<td>
{% if notification.comment %}
{{ link_user(notification.comment.author) }}
{% else %}
{{ link_user(notification.author) }}
{% endif %}
{{ link_user(notification.author) }}
</td>
<td>
{{ notification.category }}
</td>
<td>
{% if notification.comment %}
<a href="{{ notification.comment.link }}#comment-{{ notification.comment.id }}">{{ notification.comment.page_title }}</a>
{% else %}
{% autoescape off %}
{{notification.html_link}}
{% endautoescape %}
{% endif %}
{% autoescape off %}
{{notification.html_link}}
{% endautoescape %}
</td>
<td>
{{ relative_time(notification.time) }}
@ -43,8 +31,5 @@
{% endfor %}
</table>
{% endif %}
{% endblock %}
<!--
-->