Skip to content

Commit

Permalink
Rename Jinja variable
Browse files Browse the repository at this point in the history
* The issue is a name collision in Jinja
* renamed "messages" to "notifications", because the section that
  displays them is called "notifications"
  • Loading branch information
martin-bts committed Nov 3, 2019
1 parent c167218 commit 7a3b351
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions askbot/jinja2/user_inbox/responses.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% trans %}notifications{% endtrans %}
{% endblock %}
{% block inbox_content %}
{% if messages %}
{% if notifications %}
<div class="js-manage-messages">
<a class="js-mark-as-seen">{% trans %}mark seen{% endtrans %}</a> |
<a class="js-delete">{% trans %}delete{% endtrans %}</a>
Expand All @@ -15,7 +15,7 @@
{% endif %}
<p class="action-status"><span></span></p>
<div class="messages">
{% for message in messages %}{# messages are grouped by question, using the "nested_messages" #}
{% for message in notifications %}{# messages are grouped by question, using the "nested_messages" #}
<div class="js-message-group">
<h2><input type="checkbox" />"{{ message.title.strip()|escape}}"</h2>
<div class="message{% if message.is_new %} highlight new{% else %} seen{% endif %}"
Expand Down
2 changes: 1 addition & 1 deletion askbot/views/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ def user_responses(request, user, context):
'tab_name' : 'inbox',
'inbox_section': section,
'page_title' : _('profile - responses'),
'messages' : filtered_message_list,
'notifications' : filtered_message_list,
}
context.update(data)
template = 'user_inbox/responses.html'
Expand Down

0 comments on commit 7a3b351

Please sign in to comment.