diff --git a/forum/templates/forum/last_unread.jinja b/forum/templates/forum/last_unread.jinja index 7489db2b..83bcffb0 100644 --- a/forum/templates/forum/last_unread.jinja +++ b/forum/templates/forum/last_unread.jinja @@ -6,9 +6,10 @@ {% endblock %} {% block content %} -

+

Forum > -

+

+

{% trans %}Forum{% endtrans %}

{% trans %}Last unread messages{% endtrans %}

@@ -26,6 +27,7 @@ {% endfor %}

+
{% endblock %} diff --git a/forum/templates/forum/macros.jinja b/forum/templates/forum/macros.jinja index 159a1cbf..59e13196 100644 --- a/forum/templates/forum/macros.jinja +++ b/forum/templates/forum/macros.jinja @@ -99,8 +99,18 @@
-
{{ m.title }}
+
+ #{{ m.id }} +
{% trans %}Reply as quote{% endtrans %} {% if user.can_edit(m) %} @@ -113,8 +123,6 @@ {% trans %}Delete{% endtrans %} {% endif %} {% endif %} -
- {{ m.date|localtime|date(DATETIME_FORMAT) }} {{ m.date|localtime|time(DATETIME_FORMAT) }}

diff --git a/forum/views.py b/forum/views.py index 89374e36..f2f1aec0 100644 --- a/forum/views.py +++ b/forum/views.py @@ -67,7 +67,8 @@ class ForumLastUnread(ListView): topic_list = self.model.objects.filter(_last_message__date__gt=self.request.user.forum_infos.last_read_date)\ .exclude(_last_message__readers=self.request.user)\ .order_by('-_last_message__date')\ - .select_related('_last_message__author__avatar_pict') + .select_related('_last_message__author', 'author')\ + .prefetch_related('forum__edit_groups') return topic_list class ForumForm(forms.ModelForm): @@ -122,7 +123,8 @@ class ForumDetailView(CanViewMixin, DetailView): def get_context_data(self, **kwargs): kwargs = super(ForumDetailView, self).get_context_data(**kwargs) - qs = self.object.topics.order_by('-_last_message__date').select_related('_last_message__author', 'author')\ + qs = self.object.topics.order_by('-_last_message__date')\ + .select_related('_last_message__author', 'author')\ .prefetch_related("forum__edit_groups") paginator = Paginator(qs, settings.SITH_FORUM_PAGE_LENGTH)