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
be27907a
Commit
be27907a
authored
Sep 28, 2012
by
Ibrahim Awwal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add permalinks to inline threads.
parent
21042890
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
4 deletions
+10
-4
lms/djangoapps/django_comment_client/forum/views.py
+1
-1
lms/static/coffee/src/discussion/content.coffee
+6
-1
lms/static/coffee/src/discussion/utils.coffee
+1
-1
lms/static/coffee/src/discussion/views/discussion_thread_show_view.coffee
+1
-0
lms/templates/discussion/mustache/_inline_thread_show.mustache
+1
-1
No files found.
lms/djangoapps/django_comment_client/forum/views.py
View file @
be27907a
...
...
@@ -148,7 +148,7 @@ def forum_form_discussion(request, course_id):
@login_required
def
single_thread
(
request
,
course_id
,
discussion_id
,
thread_id
):
# TODO: Why is discussion_id passed in here just to pass it straight back out in the JSON?
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'load'
)
cc_user
=
cc
.
User
.
from_django_user
(
request
.
user
)
user_info
=
cc_user
.
to_dict
()
...
...
lms/static/coffee/src/discussion/content.coffee
View file @
be27907a
...
...
@@ -81,7 +81,7 @@ if Backbone?
class
@
Thread
extends
@
Content
urlMappers
:
'retrieve'
:
->
DiscussionUtil
.
urlFor
(
'retrieve_single_thread'
,
@
discussion
.
id
,
@
id
)
'retrieve'
:
->
DiscussionUtil
.
urlFor
(
'retrieve_single_thread'
,
@
discussion
.
id
,
@
id
)
# Not sure if this ID means anything anymore, or if it ever did.
'reply'
:
->
DiscussionUtil
.
urlFor
(
'create_comment'
,
@
id
)
'unvote'
:
->
DiscussionUtil
.
urlFor
(
"undo_vote_for_
#{
@
get
(
'type'
)
}
"
,
@
id
)
'upvote'
:
->
DiscussionUtil
.
urlFor
(
"upvote_
#{
@
get
(
'type'
)
}
"
,
@
id
)
...
...
@@ -91,6 +91,7 @@ if Backbone?
'delete'
:
->
DiscussionUtil
.
urlFor
(
'delete_thread'
,
@
id
)
'follow'
:
->
DiscussionUtil
.
urlFor
(
'follow_thread'
,
@
id
)
'unfollow'
:
->
DiscussionUtil
.
urlFor
(
'unfollow_thread'
,
@
id
)
'permalink'
:
->
DiscussionUtil
.
urlFor
(
'permanent_link_thread'
,
@
get
(
'commentable_id'
),
@
identifier
())
initialize
:
->
@
set
(
'thread'
,
@
)
...
...
@@ -135,6 +136,10 @@ if Backbone?
created_at_time
:
->
new
Date
(
@
get
(
"created_at"
)).
getTime
()
identifier
:
->
# Both the slug and the mongoDB ID are valid ways to get to a thread
@
get
(
'slug'
)
or
@
get
(
'id'
)
class
@
Comment
extends
@
Content
urlMappers
:
'reply'
:
->
DiscussionUtil
.
urlFor
(
'create_sub_comment'
,
@
id
)
...
...
lms/static/coffee/src/discussion/utils.coffee
View file @
be27907a
...
...
@@ -66,7 +66,7 @@ class @DiscussionUtil
permanent_link_thread
:
"/courses/
#{
$$course_id
}
/discussion/
#{
param
}
/
#{
param1
}
"
permanent_link_comment
:
"/courses/
#{
$$course_id
}
/discussion/
#{
param
}
/
#{
param1
}
#
#{
param2
}
"
user_profile
:
"/courses/
#{
$$course_id
}
/discussion/users/
#{
param
}
"
followed_threads
:
"/courses/
#{
$$course_id
}
/discussion/users/
#{
param
}
/followed"
followed_threads
:
"/courses/
#{
$$course_id
}
/discussion/users/
#{
param
}
/followed"
threads
:
"/courses/
#{
$$course_id
}
/discussion"
}[
name
]
...
...
lms/static/coffee/src/discussion/views/discussion_thread_show_view.coffee
View file @
be27907a
...
...
@@ -136,4 +136,5 @@ if Backbone?
params
=
@
model
.
toJSON
()
if
@
model
.
get
(
'username'
)
?
params
=
$
.
extend
(
params
,
user
:
{
username
:
@
model
.
username
,
user_url
:
@
model
.
user_url
})
params
=
$
.
extend
(
params
,
permalink
:
@
model
.
urlFor
(
'permalink'
))
Mustache
.
render
(
@
template
,
params
)
lms/templates/discussion/mustache/_inline_thread_show.mustache
View file @
be27907a
...
...
@@ -12,7 +12,7 @@
{{/
user
}}
<span
class=
"timeago"
title=
"
{{
created_at
}}
"
>
{{
created_at
}}
</span>
<span><a
href=
"
{{
permalink
}}
"
>
Permanent Link
</a></span>
<span
class=
"post-status-closed top-post-status"
style=
"display: none"
>
•
This thread is closed.
</span>
...
...
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