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
b5351cc5
Commit
b5351cc5
authored
Sep 14, 2012
by
Arjun Singh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support legacy anonymity
parent
033ce7ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
lms/djangoapps/django_comment_client/utils.py
+4
-0
lms/static/coffee/src/discussion/views/response_comment_show_view.coffee
+2
-1
lms/static/sass/_discussion.scss
+6
-0
lms/templates/discussion/_underscore_templates.html
+8
-2
No files found.
lms/djangoapps/django_comment_client/utils.py
View file @
b5351cc5
...
@@ -342,4 +342,8 @@ def safe_content(content):
...
@@ -342,4 +342,8 @@ def safe_content(content):
if
(
content
.
get
(
'anonymous'
)
is
False
)
and
(
content
.
get
(
'anonymous_to_peers'
)
is
False
):
if
(
content
.
get
(
'anonymous'
)
is
False
)
and
(
content
.
get
(
'anonymous_to_peers'
)
is
False
):
fields
+=
[
'username'
,
'user_id'
]
fields
+=
[
'username'
,
'user_id'
]
if
'children'
in
content
:
safe_children
=
[
safe_content
(
child
)
for
child
in
content
[
'children'
]]
content
[
'children'
]
=
safe_children
return
strip_none
(
extract
(
content
,
fields
))
return
strip_none
(
extract
(
content
,
fields
))
lms/static/coffee/src/discussion/views/response_comment_show_view.coffee
View file @
b5351cc5
...
@@ -19,7 +19,8 @@ if Backbone?
...
@@ -19,7 +19,8 @@ if Backbone?
addReplyLink
:
()
->
addReplyLink
:
()
->
if
@
model
.
hasOwnProperty
(
'parent'
)
if
@
model
.
hasOwnProperty
(
'parent'
)
html
=
"<a href='#comment_
#{
@
model
.
parent
.
id
}
'>@
#{
@
model
.
parent
.
get
(
'username'
)
}
</a>: "
name
=
@
model
.
parent
.
get
(
'username'
)
?
"anonymous"
html
=
"<a href='#comment_
#{
@
model
.
parent
.
id
}
'>@
#{
name
}
</a>: "
p
=
@
$
(
'.response-body p:first'
)
p
=
@
$
(
'.response-body p:first'
)
p
.
prepend
(
html
)
p
.
prepend
(
html
)
...
...
lms/static/sass/_discussion.scss
View file @
b5351cc5
...
@@ -1702,6 +1702,12 @@ body.discussion {
...
@@ -1702,6 +1702,12 @@ body.discussion {
background
:
#f6f6f6
!
important
;
background
:
#f6f6f6
!
important
;
border-radius
:
3px
;
border-radius
:
3px
;
header
{
.anonymous
{
font-size
:
15px
;
}
}
.responses
{
.responses
{
margin-top
:
40px
;
margin-top
:
40px
;
...
...
lms/templates/discussion/_underscore_templates.html
View file @
b5351cc5
...
@@ -93,7 +93,9 @@
...
@@ -93,7 +93,9 @@
<
header
class
=
"response-local"
>
<
header
class
=
"response-local"
>
<
a
href
=
"javascript:void(0)"
class
=
"vote-btn"
data
-
tooltip
=
"vote"
><
span
class
=
"plus-icon"
><
/span><span class="votes-count-number">${"<%- votes
[
'up_count'
]
%>"}</
span
><
/a
>
<
a
href
=
"javascript:void(0)"
class
=
"vote-btn"
data
-
tooltip
=
"vote"
><
span
class
=
"plus-icon"
><
/span><span class="votes-count-number">${"<%- votes
[
'up_count'
]
%>"}</
span
><
/a
>
<
a
href
=
"javascript:void(0)"
class
=
"endorse-btn${'<% if (endorsed) { %> is-endorsed<% } %>'} action-endorse"
style
=
"cursor: default; display: none;"
data
-
tooltip
=
"endorse"
><
span
class
=
"check-icon"
style
=
"pointer-events: none; "
><
/span></
a
>
<
a
href
=
"javascript:void(0)"
class
=
"endorse-btn${'<% if (endorsed) { %> is-endorsed<% } %>'} action-endorse"
style
=
"cursor: default; display: none;"
data
-
tooltip
=
"endorse"
><
span
class
=
"check-icon"
style
=
"pointer-events: none; "
><
/span></
a
>
<
a
href
=
"${'<%- user_url %>'}"
class
=
"posted-by"
>
$
{
"<%- username %>"
}
<
/a
>
$
{
"<% if (obj.username) { %>"
}
<
a
href
=
"${'<%- user_url %>'}"
class
=
"posted-by"
>
$
{
'<%- username %>'
}
<
/a
>
$
{
"<% } else {print('<span class=
\"
anonymous
\"
><em>anonymous</em></span>');} %>"
}
<
p
class
=
"posted-details"
title
=
"${'<%- created_at %>'}"
>
$
{
'<%- created_at %>'
}
<
/p
>
<
p
class
=
"posted-details"
title
=
"${'<%- created_at %>'}"
>
$
{
'<%- created_at %>'
}
<
/p
>
<
/header
>
<
/header
>
<
div
class
=
"response-local"
><
div
class
=
"response-body"
>
$
{
"<%- body %>"
}
<
/div></
div
>
<
div
class
=
"response-local"
><
div
class
=
"response-body"
>
$
{
"<%- body %>"
}
<
/div></
div
>
...
@@ -121,7 +123,11 @@
...
@@ -121,7 +123,11 @@
<
div
class
=
"response-body"
>
<
div
class
=
"response-body"
>
$
{
'<%- body %>'
}
$
{
'<%- body %>'
}
<
/div
>
<
/div
>
<
p
class
=
"posted-details"
>&
ndash
;
posted
<
span
class
=
"timeago"
title
=
"${'<%- created_at %>'}"
>
$
{
'<%- created_at %>'
}
<
/span> by <a href="${'<%- user_url %>'}" class="profile-link">${'<%- username %>'}</
a
><
/p
>
<
p
class
=
"posted-details"
>&
ndash
;
posted
<
span
class
=
"timeago"
title
=
"${'<%- created_at %>'}"
>
$
{
'<%- created_at %>'
}
<
/span> by
$
{
"<% if (obj.username) { %>"
}
<
a
href
=
"${'<%- user_url %>'}"
class
=
"profile-link"
>
$
{
'<%- username %>'
}
<
/a
>
$
{
"<% } else {print('anonymous');} %>"
}
<
/p
>
<
/div
>
<
/div
>
</script>
</script>
...
...
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