Skip to content

Commit

Permalink
Minimum change to display submission notification
Browse files Browse the repository at this point in the history
  • Loading branch information
teemulehtinen committed Sep 13, 2016
1 parent a618fe2 commit 1098d2b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion notification/templates/notification/_notifications_list.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
{% load i18n %}
{% load course %}
{% for notification in notifications %}
<tr class="list-entry{% if not notification.seen %} unread{% endif %}">
<td>
{% if notification.submission %}
<a href="{{ notification.submission|url }}">{{ notification.submission.exercise }}</a>
{% else %}
<a href="#notification{{ notification.id }}" class="{% if notification.seen %}collapsed{% endif %}"
data-toggle="collapse" aria-expanded="{% if notification.seen %}false{% else %}true{% endif %}" aria-controls="#notification{{ notification.id }}">
<span class="caret" aria-hidden="true"></span>
{{ notification.subject }}
</a>
{% endif %}
</td>
<td>{% firstof notification.sender.user.get_full_name notification.sender.user.username %}</td>
<td>{% firstof notification.sender.user.get_full_name notification.sender.user.username "" %}</td>
<td>{{ notification.timestamp }}</td>
</tr>
{% if notification.notification %}
<tr id="notification{{ notification.id }}" class="collapse{% if not notification.seen %} in{% endif %}">
<td colspan="3">{{ notification.notification|safe }}</td>
</tr>
{% endif %}
{% empty %}
<tr>
<td colspan="3">{% trans "No received notifications." %}</td>
Expand Down

0 comments on commit 1098d2b

Please sign in to comment.