update coffeescript to hide cohort choice if first commmentable is not cohorted

This commit is contained in:
Kevin Chugh
2013-02-06 22:00:03 -05:00
parent 1dd0ef274d
commit d047d826c7
3 changed files with 7 additions and 2 deletions

View File

@@ -17,6 +17,11 @@ if Backbone?
@$(".new-post-tags").tagsInput DiscussionUtil.tagsInputOptions()
if @$($(".topic_menu li a")[0]).attr('cohorted') != "True"
$('.choose-cohort').hide();
events:
"submit .new-post-form": "createPost"
"click .topic_dropdown_button": "toggleTopicDropdown"

View File

@@ -229,9 +229,9 @@ def forum_form_discussion(request, course_id):
'is_course_cohorted': is_course_cohorted(course_id)
}
# print "start rendering.."
return render_to_response('discussion/index.html', context)
@login_required
def single_thread(request, course_id, discussion_id, thread_id):
course = get_course_with_access(request.user, course_id, 'load')

View File

@@ -47,7 +47,7 @@
<input type="checkbox" name="anonymous_to_peers" class="discussion-anonymous-to-peers" id="new-post-anonymous-to-peers"><label for="new-post-anonymous-to-peers">post anonymously to classmates</label>
%endif
%if is_course_cohorted:
<div class="form-group-label choose-cohort" style = "display:none">
<div class="form-group-label choose-cohort">
Make visible to:
<select class="group-filter-select new-post-group" name = "group_id">
<option value="">All Groups</option>