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
d507ac6c
Commit
d507ac6c
authored
Aug 03, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
should be like this
parent
8bf4bc2d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
14 deletions
+8
-14
lms/djangoapps/django_comment_client/forum/views.py
+5
-3
lms/templates/discussion/_forum.html
+1
-1
lms/templates/discussion/_paginator.html
+1
-5
lms/templates/discussion/_sort.html
+1
-5
No files found.
lms/djangoapps/django_comment_client/forum/views.py
View file @
d507ac6c
...
...
@@ -43,10 +43,12 @@ def render_discussion(request, course_id, threads, discussion_id=None, \
'forum'
:
'discussion/_forum.html'
,
}[
discussion_type
]
base_url
=
{
"""
base_url = {
'inline': (lambda: reverse('django_comment_client.forum.views.inline_discussion', args=[course_id, discussion_id])),
'forum': (lambda: reverse('django_comment_client.forum.views.forum_form_discussion', args=[course_id, discussion_id])),
}[
discussion_type
]()
}[discussion_type]()"""
base_url
=
reverse
(
'django_comment_client.forum.views.inline_discussion'
,
args
=
[
course_id
,
discussion_id
])
annotated_content_info
=
{
thread
[
'id'
]:
get_annotated_content_info
(
thread
,
request
.
user
.
id
)
for
thread
in
threads
}
...
...
@@ -69,7 +71,7 @@ def render_inline_discussion(*args, **kwargs):
return
render_discussion
(
discussion_type
=
'inline'
,
*
args
,
**
kwargs
)
def
render_forum_discussion
(
*
args
,
**
kwargs
):
return
render_discussion
(
discussion_type
=
'
inline'
,
*
args
,
**
kwargs
)
# make everything inline for now
return
render_discussion
(
discussion_type
=
'
forum'
,
*
args
,
**
kwargs
)
def
get_threads
(
request
,
course_id
,
discussion_id
):
query_params
=
{
...
...
lms/templates/discussion/_forum.html
View file @
d507ac6c
...
...
@@ -13,8 +13,8 @@
<label
for=
"discussion-search-within-board-${discussion_id}"
class=
"discussion-search-within-board"
>
Search within board
</label>
</div>
<div
class=
"discussion-new-post control-button"
href=
"javascript:void(0)"
>
New Post
</div>
<
%
include
file=
"_sort.html"
/>
</div>
<
%
include
file=
"_sort.html"
/>
<div
class=
"threads"
>
% for thread in threads:
${renderer.render_thread(course_id, thread, show_comments=False)}
...
...
lms/templates/discussion/_paginator.html
View file @
d507ac6c
...
...
@@ -9,11 +9,7 @@
%
>
<
%
def
name=
"link_to_page(_page, text)"
>
% if discussion_type == 'inline':
<a
class=
"discussion-page-link discussion-inline-page-link"
href=
"javascript:void(0)"
page-url=
"${url_for_page(_page)}"
>
${text}
</a>
% else:
<a
class=
"discussion-page-link"
href=
"${url_for_page(_page)}"
>
${text}
</a>
% endif
<a
class=
"discussion-page-link discussion-inline-page-link"
href=
"javascript:void(0)"
page-url=
"${url_for_page(_page)}"
>
${text}
</a>
</
%
def>
<
%
def
name=
"div_page(_page)"
>
...
...
lms/templates/discussion/_sort.html
View file @
d507ac6c
...
...
@@ -20,11 +20,7 @@
def
url_for_sort
(
key
,
order
)
:
return
base_url
+
'?'
+
urlencode
(
merge
(
query_params
,
{'
page
'
:
1
,
'
sort_key
'
:
key
,
'
sort_order
'
:
order
}))
%
>
% if discussion_type == 'inline':
<a
class=
"discussion-sort-link discussion-inline-sort-link ${cls}"
href=
"javascript:void(0)"
sort-url=
"${url_for_sort(key, order)}"
>
${title}
</a>
% else:
<a
class=
"discussion-sort-link ${cls}"
href=
"${url_for_sort(key, order)}"
>
${title}
</a>
% endif
<a
class=
"discussion-sort-link discussion-inline-sort-link ${cls}"
href=
"javascript:void(0)"
sort-url=
"${url_for_sort(key, order)}"
>
${title}
</a>
</
%
def>
<div
class=
"discussion-sort"
>
...
...
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