2018-05-13 18:55:28 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
Notifications
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2018-05-29 18:20:11 +02:00
|
|
|
{% if current_user.notifications %}
|
2020-07-11 00:12:15 +02:00
|
|
|
<form method="post" action="{{ url_for('notifications.clear') }}" class="float-right">
|
2018-05-29 18:20:11 +02:00
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
2020-07-11 00:12:15 +02:00
|
|
|
<input type="submit" class="btn btn-primary" value="Clear All" />
|
2018-05-29 18:20:11 +02:00
|
|
|
</form>
|
|
|
|
{% endif %}
|
2020-07-11 00:12:15 +02:00
|
|
|
|
|
|
|
<h1>Notifications</h1>
|
|
|
|
|
|
|
|
<div class="list-group mt-3">
|
2018-05-13 18:55:28 +02:00
|
|
|
{% for n in current_user.notifications %}
|
2020-07-11 00:12:15 +02:00
|
|
|
<a class="list-group-item list-group-item-action" href="{{ n.url }}">
|
|
|
|
<div class="row">
|
2020-07-11 00:50:02 +02:00
|
|
|
<div class="col-sm">
|
2020-07-11 00:12:15 +02:00
|
|
|
{{ n.title}}
|
|
|
|
</div>
|
|
|
|
|
2020-07-11 00:50:02 +02:00
|
|
|
<div class="col-sm-auto text-muted text-right">
|
|
|
|
<span class="pr-1">{{ n.causer.display_name }}</span>
|
2020-07-11 00:12:15 +02:00
|
|
|
<img
|
|
|
|
class="img-responsive user-photo img-thumbnail img-thumbnail-1"
|
|
|
|
style="max-height: 22px;"
|
|
|
|
src="{{ n.causer.getProfilePicURL() }}" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</a>
|
2018-05-13 18:55:28 +02:00
|
|
|
{% else %}
|
2020-07-11 00:12:15 +02:00
|
|
|
<p class="list-group-item"><i>No notifications</i></p>
|
2018-05-13 18:55:28 +02:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endblock %}
|