pyfedi/app/templates/user/notifications.html

110 lines
4.7 KiB
HTML
Raw Normal View History

{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
{% endif %} %}
2023-11-30 23:21:37 +13:00
{% from 'bootstrap/form.html' import render_form %}
{% block app_content %}
<div class="row">
<div class="col-12 col-md-8 position-relative main_pane">
<nav aria-label="breadcrumb" id="breadcrumb_nav" title="Navigation">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
2024-01-03 20:53:06 +13:00
<li class="breadcrumb-item"><a href="/people">{{ _('People') }}</a></li>
2023-11-30 23:21:37 +13:00
<li class="breadcrumb-item active">{{ user.user_name|shorten }}</li>
</ol>
</nav>
<h1 class="mt-2">{{ _('Notifications') }}</h1>
{% if notifications %}
<table class="table table-striped">
<tr>
<th>Notification</th>
<th>When</th>
2024-02-26 21:26:19 +13:00
<th><a href="{{ url_for('user.notifications_all_read') }}" class="btn btn-primary btn-sm">{{ _('Mark all as read') }}</a></th>
2023-11-30 23:21:37 +13:00
</tr>
{% for notification in notifications %}
<tr>
<td>{% if not notification.read %}<strong>{% endif %}
<a href="{{ url_for('user.notification_goto', notification_id=notification.id) }}">{{ notification.title }}</a>
{% if not notification.read %}</strong>{% endif %}
</td>
<td>{{ moment(notification.created_at).fromNow(refresh=True) }}</td>
<td>
<a href="{{ url_for('user.notification_delete', notification_id=notification.id) }}" class="no-underline"><span class="fe fe-delete"></span> {{ _('Delete') }}</a>
2023-11-30 23:21:37 +13:00
</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>{{ _('No notifications to show.') }}</p>
2023-11-30 23:21:37 +13:00
{% endif %}
</div>
2024-02-05 08:39:08 +13:00
<aside id="side_pane" class="col-12 col-md-4 side_pane" role="complementary">
2023-11-30 23:21:37 +13:00
<div class="card mt-3">
<div class="card-header">
<h2>{{ _('Manage') }}</h2>
</div>
<div class="card-body">
<div class="row">
<div class="col-6">
<a class="w-100 btn btn-primary" href="/u/{{ current_user.user_name.lower() }}/profile">{{ _('Profile') }}</a>
2023-11-30 23:21:37 +13:00
</div>
<div class="col-6">
2024-03-11 20:18:27 +13:00
<a class="w-100 btn btn-primary" href="/user/settings">{{ _('Settings') }}</a>
2023-11-30 23:21:37 +13:00
</div>
</div>
</div>
</div>
{% if len(subscribed) > 0 or len(moderates) > 0 %}
<div class="card mt-3">
<div class="card-header">
<h2>{{ _('Communities') }}</h2>
</div>
<div class="card-body">
{% if len(subscribed) > 0 %}
<h4>Member of</h4>
2023-11-30 23:21:37 +13:00
<ul>
{% for community in subscribed %}
<li>
<a href="/c/{{ community.link() }}"><img src="{{ community.icon_image() }}" class="community_icon rounded-circle" loading="lazy" />{{ community.display_name() }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if len(moderates) > 0 %}
<h4>Moderates</h4>
<ul>
{% for community in moderates %}
<li>
<a href="/c/{{ community.link() }}"><img src="{{ community.icon_image() }}" class="community_icon rounded-circle" loading="lazy" />{{ community.display_name() }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
{% endif %}
{% if upvoted %}
<div class="card mt-3">
<div class="card-header">
<h2>{{ _('Upvoted') }}</h2>
</div>
<div class="card-body">
<ul>
{% for post in upvoted %}
2023-12-10 15:10:09 +13:00
<li><a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}">{{ post.title }}</a></li>
2023-11-30 23:21:37 +13:00
{% endfor %}
</ul>
</div>
</div>
{% endif %}
</aside>
2023-11-30 23:21:37 +13:00
</div>
{% endblock %}