inline mustache working
This commit is contained in:
1
.redcar/lucene/_66.cfs.REMOVED.git-id
Normal file
1
.redcar/lucene/_66.cfs.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
||||
0f446e9d6cbcb18b0982ff31a746ea770332324b
|
||||
BIN
.redcar/lucene/_66_2.del
Normal file
BIN
.redcar/lucene/_66_2.del
Normal file
Binary file not shown.
BIN
.redcar/lucene/_67.cfs
Normal file
BIN
.redcar/lucene/_67.cfs
Normal file
Binary file not shown.
BIN
.redcar/lucene/_67_1.del
Normal file
BIN
.redcar/lucene/_67_1.del
Normal file
Binary file not shown.
BIN
.redcar/lucene/_68.cfs
Normal file
BIN
.redcar/lucene/_68.cfs
Normal file
Binary file not shown.
BIN
.redcar/lucene/_68_1.del
Normal file
BIN
.redcar/lucene/_68_1.del
Normal file
Binary file not shown.
BIN
.redcar/lucene/_69.cfs
Normal file
BIN
.redcar/lucene/_69.cfs
Normal file
Binary file not shown.
BIN
.redcar/lucene/_69_1.del
Normal file
BIN
.redcar/lucene/_69_1.del
Normal file
Binary file not shown.
BIN
.redcar/lucene/_6a.cfs
Normal file
BIN
.redcar/lucene/_6a.cfs
Normal file
Binary file not shown.
1
.redcar/lucene/_u.cfs.REMOVED.git-id
Normal file
1
.redcar/lucene/_u.cfs.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
||||
5fe5d57a2b8cb1229d5b41de5a604c405c911249
|
||||
BIN
.redcar/lucene/_u_4.del
Normal file
BIN
.redcar/lucene/_u_4.del
Normal file
Binary file not shown.
BIN
.redcar/lucene/_v.cfs
Normal file
BIN
.redcar/lucene/_v.cfs
Normal file
Binary file not shown.
BIN
.redcar/lucene/_v_4.del
Normal file
BIN
.redcar/lucene/_v_4.del
Normal file
Binary file not shown.
BIN
.redcar/lucene/segments.gen
Normal file
BIN
.redcar/lucene/segments.gen
Normal file
Binary file not shown.
BIN
.redcar/lucene/segments_5q
Normal file
BIN
.redcar/lucene/segments_5q
Normal file
Binary file not shown.
1
.redcar/lucene_last_updated
Normal file
1
.redcar/lucene_last_updated
Normal file
@@ -0,0 +1 @@
|
||||
1360351700
|
||||
1
.redcar/redcar.lock
Normal file
1
.redcar/redcar.lock
Normal file
@@ -0,0 +1 @@
|
||||
28751: Locked by 28751 at Fri Feb 08 14:14:21 -0500 2013
|
||||
44
.redcar/storage/cursor_saver.yaml
Normal file
44
.redcar/storage/cursor_saver.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
cursor_positions:
|
||||
- :path: common/static/coffee/src/discussion/views/discussion_content_view.coffee
|
||||
:cursor_offset: 0
|
||||
:timestamp: 2013-01-29 15:05:38 -05:00
|
||||
- :path: common/static/coffee/src/discussion/views/discussion_thread_view.coffee
|
||||
:cursor_offset: 1383
|
||||
:timestamp: 2013-01-29 15:05:38 -05:00
|
||||
- :path: common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
|
||||
:cursor_offset: 766
|
||||
:timestamp: 2013-01-29 15:05:38 -05:00
|
||||
- :path: lms/djangoapps/django_comment_client/base/views.py
|
||||
:cursor_offset: 0
|
||||
:timestamp: 2013-02-07 10:06:26 -05:00
|
||||
- :path: common/static/coffee/src/discussion/models/discussion_user.coffee
|
||||
:cursor_offset: 0
|
||||
:timestamp: 2013-01-29 15:05:38 -05:00
|
||||
- :path: lms/djangoapps/django_comment_client/utils.py
|
||||
:cursor_offset: 811
|
||||
:timestamp: 2013-02-07 10:06:27 -05:00
|
||||
- :path: lms/templates/discussion/mustache/_new_post.mustache
|
||||
:cursor_offset: 0
|
||||
:timestamp: 2013-02-08 10:34:14 -05:00
|
||||
- :path: common/static/coffee/src/discussion/views/new_post_inline_vew.coffee
|
||||
:cursor_offset: 0
|
||||
:timestamp: 2013-02-05 12:00:15 -05:00
|
||||
- :path: lms/templates/discussion/mustache/_inline_discussion.mustache
|
||||
:cursor_offset: 278
|
||||
:timestamp: 2013-02-08 10:34:44 -05:00
|
||||
- :path: common/static/coffee/src/discussion/discussion_module_view.coffee
|
||||
:cursor_offset: 2546
|
||||
:timestamp: 2013-02-08 12:47:34 -05:00
|
||||
- :path: lms/templates/discussion/_new_post.html
|
||||
:cursor_offset: 3183
|
||||
:timestamp: 2013-02-07 10:06:27 -05:00
|
||||
:selection_offset: 2424
|
||||
:block_selection_mode: false
|
||||
- :path: lms/templates/discussion/mustache/_inline_discussion_cohorted.mustache
|
||||
:cursor_offset: 1099
|
||||
:timestamp: 2013-02-08 12:44:34 -05:00
|
||||
- :path: lms/djangoapps/django_comment_client/forum/views.py
|
||||
:cursor_offset: 5507
|
||||
:timestamp: 2013-02-08 12:42:07 -05:00
|
||||
files_to_retain: 0
|
||||
7
.redcar/storage/project_loader.yaml
Normal file
7
.redcar/storage/project_loader.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
open_files:
|
||||
- lms/templates/discussion/mustache/_inline_discussion.mustache
|
||||
- common/static/coffee/src/discussion/discussion_module_view.coffee
|
||||
- lms/templates/discussion/_new_post.html
|
||||
- lms/templates/discussion/mustache/_inline_discussion_cohorted.mustache
|
||||
- lms/djangoapps/django_comment_client/forum/views.py
|
||||
7
.redcar/storage/sessions.yaml
Normal file
7
.redcar/storage/sessions.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
bounds:
|
||||
x: 65
|
||||
y: 24
|
||||
width: 1857
|
||||
height: 1085
|
||||
tree_width: 667
|
||||
1
.redcar/tags.REMOVED.git-id
Normal file
1
.redcar/tags.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
||||
91fb8f5bb1f34326b4cb90f3d3770affcd1d7d58
|
||||
@@ -70,6 +70,7 @@ if Backbone?
|
||||
DiscussionUtil.loadRoles(response.roles)
|
||||
allow_anonymous = response.allow_anonymous
|
||||
allow_anonymous_to_peers = response.allow_anonymous_to_peers
|
||||
cohorts = response.cohorts
|
||||
# $elem.html("Hide Discussion")
|
||||
@discussion = new Discussion()
|
||||
@discussion.reset(response.discussion_data, {silent: false})
|
||||
@@ -78,8 +79,12 @@ if Backbone?
|
||||
#determined in the coffeescript based on whether or not there's a
|
||||
#group id
|
||||
|
||||
$discussion = $(Mustache.render $("script#_inline_discussion").html(), {'threads':response.discussion_data, 'discussionId': discussionId, 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous})
|
||||
if response.is_cohorted
|
||||
source = "script#_inline_discussion_cohorted"
|
||||
else
|
||||
source = "script#_inline_discussion"
|
||||
|
||||
$discussion = $(Mustache.render $(source).html(), {'threads':response.discussion_data, 'discussionId': discussionId, 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous, 'cohorts':cohorts})
|
||||
if @$('section.discussion').length
|
||||
@$('section.discussion').replaceWith($discussion)
|
||||
else
|
||||
|
||||
@@ -132,11 +132,12 @@ def inline_discussion(request, course_id, discussion_id):
|
||||
#since inline is all one commentable, only show or allow the choice of cohorts
|
||||
#if the commentable is cohorted, otherwise everything is not cohorted
|
||||
#and no one has the option of choosing a cohort
|
||||
is_cohorted = is_course_cohorted(course_id) and is_commentable_cohorted(course_id, discussion_id)
|
||||
is_cohorted = is_course_cohorted(course_id) and is_commentable_cohorted(course_id, discussion_id)
|
||||
|
||||
cohorts_list = list()
|
||||
|
||||
if is_cohorted:
|
||||
cohorts_list.append({'name':'All Groups','id':None})
|
||||
|
||||
#if you're a mod, send all cohorts and let you pick
|
||||
if cached_has_permission(request.user, "see_all_cohorts", course_id):
|
||||
@@ -152,9 +153,7 @@ def inline_discussion(request, course_id, discussion_id):
|
||||
user_cohort_id = user_cohort.id
|
||||
else:
|
||||
user_cohort_name = user_cohort_id = None
|
||||
|
||||
|
||||
cohorts_list.append({'name':'All Groups','id':None})
|
||||
|
||||
if user_cohort:
|
||||
cohorts_list.append({'name':user_cohort_name, 'id':user_cohort_id})
|
||||
else:
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<div class="inner-wrapper">
|
||||
<div class="new-post-form-errors">
|
||||
</div>
|
||||
AAAAAAA
|
||||
<form class="new-post-form">
|
||||
<div class="form-row">
|
||||
<input type="text" class="new-post-title" name="title" placeholder="Title">
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<section class="discussion" data-discussion-id="{{discussionId}}">
|
||||
<article class="new-post-article">
|
||||
<span class="topic" data-discussion-id="{{discussionId}}" />
|
||||
<div class="inner-wrapper">
|
||||
<div class="new-post-form-errors">
|
||||
</div>
|
||||
<form class="new-post-form">
|
||||
<div class="form-row">
|
||||
<input type="text" class="new-post-title" name="title" placeholder="Title">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="new-post-body" name="body" placeholder="Enter your question or comment…"></div>
|
||||
<!---<div class="new-post-preview"><span class="new-post-preview-label">Preview</span></div>-->
|
||||
</div>
|
||||
{{! TODO tags: Getting rid of tags for now. }}
|
||||
{{!<div class="form-row">}}
|
||||
{{! <input type="text" class="new-post-tags" name="tags" placeholder="Tags">}}
|
||||
{{!</div>}}
|
||||
<input type="submit" class="submit" value="Add post">
|
||||
<a href="#" class="new-post-cancel">Cancel</a>
|
||||
<div class="options">
|
||||
<input type="checkbox" name="follow" class="discussion-follow" class="discussion-follow" id="new-post-follow" checked><label for="new-post-follow">follow this post</label>
|
||||
<br>
|
||||
{{#allow_anonymous}}
|
||||
<input type="checkbox" name="anonymous" class="discussion-anonymous" id="new-post-anonymous"><label for="new-post-anonymous">post anonymously</label>
|
||||
{{/allow_anonymous}}
|
||||
{{#allow_anonymous_to_peers}}
|
||||
<input type="checkbox" name="anonymous" class="discussion-anonymous-to-peers" id="new-post-anonymous-to-peers"><label for="new-post-anonymous-to-peers">post anonymously to classmates</label>
|
||||
{{/allow_anonymous_to_peers}}
|
||||
|
||||
<div class="form-group-label choose-cohort">
|
||||
Make visible to:
|
||||
<select class="group-filter-select new-post-group" name = "group_id">
|
||||
{{#cohorts}}
|
||||
<option value="{{id}}">{{name}}</option>
|
||||
{{/cohorts}}
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<section class="threads">
|
||||
{{#threads}}
|
||||
<article class="discussion-thread" id="thread_{{id}}">
|
||||
</article>
|
||||
{{/threads}}
|
||||
</section>
|
||||
|
||||
<section class="pagination">
|
||||
</section>
|
||||
</section>
|
||||
Reference in New Issue
Block a user