Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Sith
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
59
Issues
59
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AE
Sith
Commits
7d99f02a
Commit
7d99f02a
authored
Feb 25, 2017
by
Skia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forum: reply page, CSS, and first_unread fix
parent
777fdd7b
Pipeline
#772
passed with stage
in 3 minutes and 34 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
core/static/core/style.css
core/static/core/style.css
+6
-0
forum/templates/forum/topic.jinja
forum/templates/forum/topic.jinja
+3
-0
forum/views.py
forum/views.py
+6
-1
No files found.
core/static/core/style.css
View file @
7d99f02a
...
...
@@ -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
;
...
...
forum/templates/forum/topic.jinja
View file @
7d99f02a
...
...
@@ -39,6 +39,9 @@
<p><a
href=
"
{{
url
(
'forum:new_message'
,
topic_id
=
topic.id
)
}}
"
>
{%
trans
%}
Reply
{%
endtrans
%}
</a></p>
{%
for
m
in
topic.messages.select_related
(
'author__avatar_pict'
)
.
all
()
%}
{%
if
m.id
==
first_unread_message_id
%}
<span
id=
"first_unread"
></span>
{%
endif
%}
{%
if
m.id
>=
first_unread_message_id
%}
{{
display_message
(
m
,
user
,
True
)
}}
{%
else
%}
...
...
forum/views.py
View file @
7d99f02a
...
...
@@ -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"
...
...
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