diff --git a/core/static/core/style.css b/core/static/core/style.css index 5a7235ed..e618f1e4 100644 --- a/core/static/core/style.css +++ b/core/static/core/style.css @@ -247,10 +247,16 @@ tbody>tr:hover { background: darkgrey; width: 100%; } +em { + font-style: italic; +} .highlight { background: orange; font-weight: bold; } +.underline { + text-decoration: underline; +} .tool-bar { overflow: auto; padding: 4px; diff --git a/forum/templates/forum/topic.jinja b/forum/templates/forum/topic.jinja index 6e471d68..a6536f25 100644 --- a/forum/templates/forum/topic.jinja +++ b/forum/templates/forum/topic.jinja @@ -39,6 +39,9 @@

{% trans %}Reply{% endtrans %}

{% for m in topic.messages.select_related('author__avatar_pict').all() %} + {% if m.id == first_unread_message_id %} + + {% endif %} {% if m.id >= first_unread_message_id %} {{ display_message(m, user, True) }} {% else %} diff --git a/forum/views.py b/forum/views.py index 6e46658f..145fabf4 100644 --- a/forum/views.py +++ b/forum/views.py @@ -144,13 +144,18 @@ class ForumTopicDetailView(CanViewMixin, DetailView): class ForumMessageEditView(CanEditMixin, UpdateView): model = ForumMessage fields = ['title', 'message'] - template_name = "core/edit.jinja" + template_name = "forum/reply.jinja" pk_url_kwarg = "message_id" def form_valid(self, form): ForumMessageMeta(message=self.object, user=self.request.user, action="EDIT").save() return super(ForumMessageEditView, self).form_valid(form) + def get_context_data(self, **kwargs): + kwargs = super(ForumMessageEditView, self).get_context_data(**kwargs) + kwargs['topic'] = self.object.topic + return kwargs + class ForumMessageDeleteView(SingleObjectMixin, RedirectView): model = ForumMessage pk_url_kwarg = "message_id"