diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-05-13 17:55:28 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-05-13 18:04:07 +0100 |
| commit | 4fdafefcd5b0267e3b9958f3dcc6b05a6eeb0906 (patch) | |
| tree | aa9aa3b351302353e2ff8eaf943654c0da22a15d /app/templates | |
| parent | f3c433de06e19ae9a6e1706b4746d46e6a33d70c (diff) | |
| download | cheatdb-4fdafefcd5b0267e3b9958f3dcc6b05a6eeb0906.tar.xz | |
Add notifications
Fixes #28
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/base.html | 1 | ||||
| -rw-r--r-- | app/templates/notifications/list.html | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/app/templates/base.html b/app/templates/base.html index 0ab87b4..cdf1f1f 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -40,6 +40,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> {% if current_user.is_authenticated %} + <li><a href="{{ url_for('notifications_page') }}">({{ current_user.notifications | length }})</a></li> <li><a href="{{ url_for('user_profile_page', username=current_user.username) }}">{{ current_user.display_name }}</a></li> <li><a href="{{ url_for('user.logout') }}">Sign out</a></li> {% else %} diff --git a/app/templates/notifications/list.html b/app/templates/notifications/list.html new file mode 100644 index 0000000..fb133e8 --- /dev/null +++ b/app/templates/notifications/list.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block title %} +Notifications +{% endblock %} + +{% block content %} + <ul> + {% for n in current_user.notifications %} + <li><a href="{{ n.url }}"> + {{ n.title}} [{{ n.causer.display_name }}] + </a></li> + {% else %} + <li><i>No notifications</i></ul> + {% endfor %} + </ul> +{% endblock %} |
