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
6132b9b2
Commit
6132b9b2
authored
Sep 20, 2012
by
Arjun Singh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alter some css; don't send the user if there is no user when retrieivng a thread
parent
6824ab63
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
12 deletions
+27
-12
lms/lib/comment_client/thread.py
+12
-1
lms/lib/comment_client/user.py
+0
-1
lms/static/coffee/src/discussion/discussion_router.coffee
+1
-1
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+2
-2
lms/static/sass/_discussion.scss
+3
-6
lms/templates/discussion/_underscore_templates.html
+9
-1
No files found.
lms/lib/comment_client/thread.py
View file @
6132b9b2
...
...
@@ -65,5 +65,16 @@ class Thread(models.Model):
# that subclasses don't need to override for this.
def
_retrieve
(
self
,
*
args
,
**
kwargs
):
url
=
self
.
url
(
action
=
'get'
,
params
=
self
.
attributes
)
response
=
perform_request
(
'get'
,
url
,
{
'recursive'
:
kwargs
.
get
(
'recursive'
),
'user_id'
:
kwargs
.
get
(
'user_id'
),
'mark_as_read'
:
kwargs
.
get
(
'mark_as_read'
,
True
)})
request_params
=
{
'recursive'
:
kwargs
.
get
(
'recursive'
),
'user_id'
:
kwargs
.
get
(
'user_id'
),
'mark_as_read'
:
kwargs
.
get
(
'mark_as_read'
,
True
),
}
# user_id may be none, in which case it shouldn't be part of the
# request.
request_params
=
strip_none
(
request_params
)
response
=
perform_request
(
'get'
,
url
,
request_params
)
self
.
update_attributes
(
**
response
)
lms/lib/comment_client/user.py
View file @
6132b9b2
...
...
@@ -2,7 +2,6 @@ from utils import *
import
models
import
settings
import
json
class
User
(
models
.
Model
):
...
...
lms/static/coffee/src/discussion/discussion_router.coffee
View file @
6132b9b2
...
...
@@ -28,7 +28,7 @@ if Backbone?
showThread
:
(
forum_name
,
thread_id
)
->
@
thread
=
@
discussion
.
get
(
thread_id
)
@
thread
.
set
(
"unread_comments_count"
,
0
)
@
thread
.
set
(
"
viewe
d"
,
true
)
@
thread
.
set
(
"
rea
d"
,
true
)
@
setActiveThread
()
if
(
@
main
)
@
main
.
cleanup
()
...
...
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
6132b9b2
...
...
@@ -130,8 +130,8 @@ if Backbone?
content
.
addClass
(
"followed"
)
if
thread
.
get
(
'endorsed'
)
content
.
addClass
(
"resolved"
)
if
thread
.
get
(
'
viewe
d'
)
content
.
addClass
(
"
viewe
d"
)
if
thread
.
get
(
'
rea
d'
)
content
.
addClass
(
"
rea
d"
)
@
highlight
(
content
)
...
...
lms/static/sass/_discussion.scss
View file @
6132b9b2
...
...
@@ -1135,10 +1135,6 @@ body.discussion {
background
:
url(../images/following-flag.png)
no-repeat
;
}
&
.viewed
{
@include
linear-gradient
(
top
,
white
,
#ddd
);
}
&
.active
{
@include
linear-gradient
(
top
,
#96e0fd
,
#61c7fc
);
border-color
:
#4697c1
;
...
...
@@ -1209,12 +1205,13 @@ body.discussion {
background-position
:
0
-5px
;
}
&
.
new
{
@include
linear-gradient
(
top
,
#84d7fe
,
#99e0fe
);
&
.
unread
{
@include
linear-gradient
(
top
,
#84d7fe
,
#60a8d6
);
color
:
#333
;
&
:after
{
color
:
#99e0fe
;
background-position
:
0
0px
;
}
}
}
...
...
lms/templates/discussion/_underscore_templates.html
View file @
6132b9b2
...
...
@@ -128,5 +128,13 @@
</script>
<script
type=
"text/template"
id=
"thread-list-item-template"
>
<
a
href
=
"${'<%- id %>'}"
data
-
id
=
"${'<%- id %>'}"
><
span
class
=
"title"
>
$
{
"<%- title %>"
}
<
/span> <span class="comments-count">${"<%- unread_comments_count %>"}</
span
><
span
class
=
"votes-count"
>+
$
{
"<%- votes['up_count'] %>"
}
<
/span></
a
>
<
a
href
=
"${'<%- id %>'}"
data
-
id
=
"${'<%- id %>'}"
>
<
span
class
=
"title"
>
$
{
"<%- title %>"
}
<
/span>
$
{
"<% if (unread_comments_count > 0) { %>"
}
<
span
class
=
"comments-count unread"
>
$
{
"<%- unread_comments_count %>"
}
<
/span
>
$
{
"<% } else { %>"
}
<
span
class
=
"comments-count"
>
$
{
"<%- comments_count %>"
}
<
/span
>
$
{
"<% } %>"
}
<
span
class
=
"votes-count"
>+
$
{
"<%- votes['up_count'] %>"
}
<
/span
>
<
/a
>
</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