removed new post button & added recent threads to single thread page
This commit is contained in:
@@ -209,16 +209,28 @@ def single_thread(request, course_id, discussion_id, thread_id):
|
||||
else:
|
||||
course = get_course_with_access(request.user, course_id, 'load')
|
||||
|
||||
recent_active_threads = cc.search_recent_active_threads(
|
||||
course_id,
|
||||
recursive=False,
|
||||
query_params={'follower_id': request.user.id},
|
||||
)
|
||||
|
||||
trending_tags = cc.search_trending_tags(
|
||||
course_id,
|
||||
)
|
||||
|
||||
context = {
|
||||
'discussion_id': discussion_id,
|
||||
'csrf': csrf(request)['csrf_token'],
|
||||
'init': '',
|
||||
'content': render_single_thread(request, discussion_id, course_id, thread_id),
|
||||
'course': course,
|
||||
'recent_active_threads': recent_active_threads,
|
||||
'trending_tags': trending_tags,
|
||||
'course_id': course.id,
|
||||
}
|
||||
|
||||
return render_to_response('discussion/index.html', context)
|
||||
return render_to_response('discussion/single_thread.html', context)
|
||||
|
||||
def user_profile(request, course_id, user_id):
|
||||
|
||||
|
||||
35
lms/templates/discussion/single_thread.html
Normal file
35
lms/templates/discussion/single_thread.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<%inherit file="../main.html" />
|
||||
<%namespace name='static' file='../static_content.html'/>
|
||||
<%block name="bodyclass">discussion</%block>
|
||||
<%block name="title"><title>Discussion – MITx 6.002x</title></%block>
|
||||
|
||||
<%block name="headextra">
|
||||
<%static:css group='course'/>
|
||||
<%include file="_js_head_dependencies.html" />
|
||||
</%block>
|
||||
|
||||
<%block name="js_extra">
|
||||
<%include file="_js_body_dependencies.html" />
|
||||
</%block>
|
||||
|
||||
<%include file="../courseware/course_navigation.html" args="active_page='discussion'" />
|
||||
|
||||
<section class="container">
|
||||
<div class="course-wrapper">
|
||||
<section aria-label="Course Navigation" class="course-index">
|
||||
<nav>
|
||||
|
||||
<article class="sidebar-module discussion-sidebar">
|
||||
</article>
|
||||
<%include file="_recent_active_posts.html" />
|
||||
|
||||
<%include file="_trending_tags.html" />
|
||||
|
||||
</nav>
|
||||
</section>
|
||||
|
||||
<section class="course-content">
|
||||
${content}
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user