Add notification
This commit is contained in:
parent
ab59065c0b
commit
de704fc250
17 changed files with 279 additions and 56 deletions
39
templates/notification/list.html
Normal file
39
templates/notification/list.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% if not has_notifications %}
|
||||
|
||||
<h2 style="text-align: center;">{{ _('You have no notifications') }}</h2>
|
||||
|
||||
{% else %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>{{ _('User') }}</th>
|
||||
<th>{{ _('Activity') }}</th>
|
||||
<th>{{ _('Comment') }}</th>
|
||||
<th>{{ _('Time') }}</th>
|
||||
</tr>
|
||||
{% for notification in notifications %}
|
||||
<tr class="{{ 'highlight' if not notification.seen }}">
|
||||
<td>
|
||||
{{ link_user(notification.comment.author) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ notification.category }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ notification.comment.link }}#comment-{{ notification.comment.id }}">{{ page_titles[notification.comment.page] }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ relative_time(notification.time) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<!--
|
||||
-->
|
Loading…
Add table
Add a link
Reference in a new issue