watch/unwatch, vote status enabled in all views
This commit is contained in:
@@ -95,6 +95,7 @@ def render_discussion(request, threads, discussion_id=None, search_text=''):
|
||||
'threads': threads,
|
||||
'discussion_id': discussion_id,
|
||||
'search_bar': render_search_bar(request, discussion_id, text=search_text),
|
||||
'user_info': comment_client.get_user_info(request.user.id, raw=True),
|
||||
}
|
||||
return render_to_string('discussion/inline.html', context)
|
||||
|
||||
@@ -139,6 +140,7 @@ def forum_form_discussion(request, course_id, discussion_id):
|
||||
def render_single_thread(request, thread_id):
|
||||
context = {
|
||||
'thread': comment_client.get_thread(thread_id, recursive=True),
|
||||
'user_info': comment_client.get_user_info(request.user.id, raw=True),
|
||||
}
|
||||
return render_to_string('discussion/single_thread.html', context)
|
||||
|
||||
@@ -149,7 +151,7 @@ def single_thread(request, thread_id):
|
||||
'init': '',
|
||||
'content': render_single_thread(request, thread_id),
|
||||
'accordion': '',
|
||||
'user_info': json.dumps(comment_client.get_user_info(request.user.id)),
|
||||
'user_info': comment_client.get_user_info(request.user.id, raw=True),
|
||||
}
|
||||
|
||||
return render_to_response('discussion/index.html', context)
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
</%block>
|
||||
|
||||
<%block name="js_extra">
|
||||
<script type="text/javascript">
|
||||
var user_info = JSON.parse('${user_info}');
|
||||
</script>
|
||||
|
||||
</%block>
|
||||
|
||||
##<%include file="../course_navigation.html" args="active_page='discussion'" />
|
||||
|
||||
@@ -14,3 +14,8 @@
|
||||
${renderer.render_thread(thread, edit_thread=False, show_comments=False)}
|
||||
% endfor
|
||||
</section>
|
||||
|
||||
<script type="text/javascript">
|
||||
var user_info = JSON.parse('${user_info}');
|
||||
</script>
|
||||
|
||||
|
||||
@@ -4,3 +4,8 @@
|
||||
<a class="discussion-title" href="javascript:void(0)">Discussion</a>
|
||||
${renderer.render_thread(thread, edit_thread=True, show_comments=True)}
|
||||
</section>
|
||||
|
||||
<script type="text/javascript">
|
||||
var user_info = JSON.parse('${user_info}');
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user