mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-05-31 22:58:18 +00:00
b990d9ccd8
We were passing the *requesting* user's moved_to value to the Move notification template, instead of the id of the user that they are being notified about. Additionally, the id_to_username template tag had no fallback for if the user_id is None. This resolves both problems and removes an unnecessary space in a template for when the logged in user made the move. Fixes #3196
30 lines
898 B
HTML
30 lines
898 B
HTML
{% extends 'notifications/items/layout.html' %}
|
|
|
|
{% load i18n %}
|
|
{% load utilities %}
|
|
{% load user_page_tags %}
|
|
|
|
{% block primary_link %}{% spaceless %}
|
|
{{ notification.related_object.local_path }}
|
|
{% endspaceless %}{% endblock %}
|
|
|
|
{% block icon %}
|
|
<span class="icon icon-local"></span>
|
|
{% endblock %}
|
|
|
|
{% block description %}
|
|
{% if related_user_moved_to %}
|
|
{% id_to_username related_user_moved_to as username %}
|
|
{% blocktrans trimmed %}
|
|
{{ related_user }} has moved to <a href="{{ related_user_moved_to }}">{{ username }}</a>
|
|
{% endblocktrans %}
|
|
<div class="row shrink my-2">
|
|
{% include 'snippets/move_user_buttons.html' with group=notification.related_group %}
|
|
</div>
|
|
{% else %}
|
|
{% blocktrans trimmed %}
|
|
{{ related_user }} has undone their move
|
|
{% endblocktrans %}
|
|
{% endif %}
|
|
{% endblock %}
|