contentdb/app/templates/notifications/list.html

104 lines
2.8 KiB
HTML
Raw Normal View History

2018-05-13 18:55:28 +02:00
{% extends "base.html" %}
{% block title %}
2022-01-08 00:27:00 +01:00
{{ _("Notifications") }}
2018-05-13 18:55:28 +02:00
{% endblock %}
{% block content %}
{% if current_user.notifications %}
2022-01-27 21:00:33 +01:00
<form method="post" action="{{ url_for('notifications.clear') }}" class="float-end">
<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" />
</form>
2022-01-27 21:00:33 +01:00
<a href="{{ url_for('users.email_notifications', username=current_user.username) }}" class="btn btn-secondary float-end me-3">
{{ _("Edit email notification settings") }}
</a>
{% endif %}
2020-07-11 00:12:15 +02:00
2022-01-08 00:27:00 +01:00
<h1>{{ self.title() }}</h1>
2020-07-11 00:12:15 +02:00
2020-12-05 23:36:00 +01:00
{% if current_user.notifications %}
<p>
2022-01-08 00:27:00 +01:00
{{ _("Newest first.") }}
2020-12-05 23:36:00 +01:00
</p>
{% endif %}
{% if editor_notifications %}
2022-01-08 00:27:00 +01:00
<h2>{{ _("Your Notifications") }}</h2>
{% endif %}
2020-07-11 00:12:15 +02:00
<div class="list-group mt-3">
{% for n in notifications %}
2020-07-11 00:12:15 +02:00
<a class="list-group-item list-group-item-action" href="{{ n.url }}">
<div class="row">
{% if n.package %}
<div class="col-sm-auto text-muted" style="min-width: 200px;">
<img
2020-12-05 02:51:50 +01:00
class="img-fluid"
style="max-height: 22px; max-width: 22px;"
2021-01-29 21:21:17 +01:00
src="{{ n.package.getThumbnailOrPlaceholder() }}" />
2022-01-27 21:00:33 +01:00
<span class="ps-2">
{{ n.package.title }}
</span>
</div>
{% endif %}
<div class="col-sm">
2020-07-11 00:12:15 +02:00
{{ n.title}}
</div>
2022-01-27 21:00:33 +01:00
<div class="col-sm-auto text-muted text-end">
<span class="pe-2">{{ n.causer.display_name }}</span>
2020-07-11 00:12:15 +02:00
<img
2020-12-05 02:51:50 +01:00
class="img-fluid user-photo img-thumbnail img-thumbnail-1"
2020-07-11 00:12:15 +02:00
style="max-height: 22px;"
src="{{ n.causer.getProfilePicURL() }}" />
</div>
</div>
</a>
2018-05-13 18:55:28 +02:00
{% else %}
2022-01-08 00:27:00 +01:00
<p class="list-group-item"><i>{{ _("No notifications") }}</i></p>
2018-05-13 18:55:28 +02:00
{% endfor %}
</div>
{% if editor_notifications %}
2022-01-08 00:27:00 +01:00
<h2>{{ _("Editor/Approver Notifications") }}</h2>
<div class="list-group mt-3">
{% for n in editor_notifications %}
<a class="list-group-item list-group-item-action" href="{{ n.url }}">
<div class="row">
{% if n.package %}
<div class="col-sm-auto text-muted">
<img
class="img-fluid"
style="max-height: 22px; max-width: 22px;"
2021-01-29 21:21:17 +01:00
src="{{ n.package.getThumbnailOrPlaceholder() }}" />
2022-01-27 21:00:33 +01:00
<span class="ps-2">
{{ n.package.title }}
</span>
</div>
{% endif %}
<div class="col-sm">
{{ n.title}}
</div>
2022-01-27 21:00:33 +01:00
<div class="col-sm-auto text-muted text-end">
<span class="pe-2">{{ n.causer.display_name }}</span>
<img
class="img-fluid user-photo img-thumbnail img-thumbnail-1"
style="max-height: 22px;"
src="{{ n.causer.getProfilePicURL() }}" />
</div>
</div>
</a>
{% else %}
2022-01-08 00:27:00 +01:00
<p class="list-group-item"><i>{{ _("No notifications") }}</i></p>
{% endfor %}
</div>
{% endif %}
2018-05-13 18:55:28 +02:00
{% endblock %}