Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
fb6a07c8
Commit
fb6a07c8
authored
Nov 16, 2012
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow flagging for abuse and spoilers
parent
7c7ca3ff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
5 deletions
+16
-5
lms/lib/comment_client/comment.py
+1
-1
lms/lib/comment_client/thread.py
+1
-1
lms/static/coffee/src/discussion/content.coffee
+10
-2
lms/templates/discussion/_underscore_templates.html
+4
-1
No files found.
lms/lib/comment_client/comment.py
View file @
fb6a07c8
...
...
@@ -10,7 +10,7 @@ class Comment(models.Model):
'id'
,
'body'
,
'anonymous'
,
'anonymous_to_peers'
,
'course_id'
,
'endorsed'
,
'parent_id'
,
'thread_id'
,
'username'
,
'votes'
,
'user_id'
,
'closed'
,
'created_at'
,
'updated_at'
,
'depth'
,
'at_position_list'
,
'type'
,
'commentable_id'
,
'type'
,
'commentable_id'
,
'abuse_flaggers'
,
'spoiler_flaggers'
]
updatable_fields
=
[
...
...
lms/lib/comment_client/thread.py
View file @
fb6a07c8
...
...
@@ -10,7 +10,7 @@ class Thread(models.Model):
'closed'
,
'tags'
,
'votes'
,
'commentable_id'
,
'username'
,
'user_id'
,
'created_at'
,
'updated_at'
,
'comments_count'
,
'unread_comments_count'
,
'at_position_list'
,
'children'
,
'type'
,
'highlighted_title'
,
'highlighted_body'
,
'endorsed'
,
'read'
'highlighted_body'
,
'endorsed'
,
'read'
,
'abuse_flaggers'
,
'spoiler_flaggers'
]
updatable_fields
=
[
...
...
lms/static/coffee/src/discussion/content.coffee
View file @
fb6a07c8
...
...
@@ -78,7 +78,8 @@ if Backbone?
if
@
getContent
(
id
)
@
getContent
(
id
).
updateInfo
(
info
)
$
.
extend
@
contentInfos
,
infos
class
@
Thread
extends
@
Content
urlMappers
:
'retrieve'
:
->
DiscussionUtil
.
urlFor
(
'retrieve_single_thread'
,
@
discussion
.
id
,
@
id
)
...
...
@@ -119,7 +120,13 @@ if Backbone?
else
@
get
(
"body"
)
display_title
:
->
display_tigetCommentsCount
:
->
count
=
0
@
get
(
'comments'
).
each
(
comment
)
->
count
+=
comment
.
getCommentsCount
()
+
1
count
class
@
Comments
extends
Backbtle
:
->
if
@
has
(
"highlighted_title"
)
String
(
@
get
(
"highlighted_title"
)).
replace
(
/<highlight>/g
,
'<mark>'
).
replace
(
/<\/highlight>/g
,
'</mark>'
)
else
...
...
@@ -134,6 +141,7 @@ if Backbone?
created_at_time
:
->
new
Date
(
@
get
(
"created_at"
)).
getTime
()
class
@
Comment
extends
@
Content
urlMappers
:
...
...
lms/templates/discussion/_underscore_templates.html
View file @
fb6a07c8
...
...
@@ -26,7 +26,10 @@
<
div
class
=
"discussion-post"
>
<
div
><
a
href
=
"javascript:void(0)"
class
=
"dogear action-follow"
data
-
tooltip
=
"follow"
><
/a></
div
>
<
header
>
<
a
href
=
"#"
class
=
"vote-btn discussion-vote discussion-vote-up"
data
-
role
=
"discussion-vote"
data
-
tooltip
=
"vote"
><
span
class
=
"plus-icon"
>+<
/span> <span class='votes-count-number'>${'<%- votes
[
"up_count"
]
%>'}</
span
><
/a
>
<
a
href
=
"#"
class
=
"vote-btn discussion-vote discussion-vote-up"
data
-
role
=
"discussion-vote"
data
-
tooltip
=
"vote"
>
<
span
class
=
"plus-icon"
>+<
/span> <span class='votes-count-number'>${'<%- votes
[
"up_count"
]
%>'}</
span
><
/a
>
<
a
href
=
"#"
class
=
"abuse-btn discussion-vote discussion-vote-up"
data
-
role
=
"discussion-flag"
data
-
tooltip
=
"flag as abusive"
>
<
span
class
=
"plus-icon"
>+<
/span> <span class='votes-count-number'>${'<%- abuse_flaggers.length%>'}</
span
><
/a
>
<
h1
>
$
{
'<%- title %>'
}
<
/h1
>
<
p
class
=
"posted-details"
>
$
{
"<% if (obj.username) { %>"
}
...
...
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