Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
AE
Sith
Commits
32ac6640
Commit
32ac6640
authored
May 30, 2017
by
Skia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fix with forum topic titles
Signed-off-by:
Skia
<
skia@libskia.so
>
parent
06b67f1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
forum/models.py
forum/models.py
+1
-1
forum/templates/forum/macros.jinja
forum/templates/forum/macros.jinja
+1
-1
No files found.
forum/models.py
View file @
32ac6640
...
...
@@ -246,7 +246,7 @@ class ForumMessage(models.Model):
super
(
ForumMessage
,
self
).
save
(
*
args
,
**
kwargs
)
if
self
.
is_last_in_topic
():
self
.
topic
.
_last_message_id
=
self
.
id
if
self
.
is_first_in_topic
():
if
self
.
is_first_in_topic
()
and
self
.
title
:
self
.
topic
.
_title
=
self
.
title
self
.
topic
.
_message_number
=
self
.
topic
.
messages
.
count
()
self
.
topic
.
save
()
...
...
forum/templates/forum/macros.jinja
View file @
32ac6640
...
...
@@ -54,7 +54,7 @@
{%
else
%}
<a
class=
"ib w_big"
href=
"
{{
url
(
'forum:view_topic'
,
topic_id
=
topic.id
)
}}
"
>
{%
endif
%}
<div
class=
"title"
>
{{
topic.title
}}
</div>
<div
class=
"title"
>
{{
topic.title
or
topic.messages.first
()
.
title
}}
</div>
<p>
{{
topic.description
}}
</p>
</a>
{%
if
user.can_edit
(
topic
)
%}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment