almost there

This commit is contained in:
Your Name
2013-03-13 15:29:57 -04:00
parent 7450128064
commit a2f9e4d565
3 changed files with 12 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ if Backbone?
events:
"click .discussion-vote": "toggleVote"
"click .discussion-pin": "togglePin"
"click .admin-pin": "togglePin"
"click .action-follow": "toggleFollowing"
"click .action-edit": "edit"
"click .action-delete": "delete"

View File

@@ -88,6 +88,7 @@ def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAG
'tags', 'commentable_ids'])))
threads, page, num_pages = cc.Thread.search(query_params)
#now add the group name if the thread has a group id
for thread in threads:

View File

@@ -46,10 +46,17 @@
<div class="post-body">${'<%- body %>'}</div>
% if has_permission(user, 'create_comment', course.id):
<div class="discussion-pin notpinned" data-role="thread-pin" data-tooltip="pin this thread">
<i class="icon"></i><span class="pin-label">Pin Thread</span></div>
% if has_permission(user, 'create_commentx', course.id):
<div class="admin-pin discussion-pin notpinned" data-role="thread-pin" data-tooltip="pin this thread">
<i class="icon"></i><span class="pin-label">Pin Thread</span></div>
elif pinned:
THIS ONE IS PINNED
% endif
${'<% if (obj.courseware_url) { %>'}
<div class="post-context">
(this post is about <a href="${'<%- courseware_url%>'}">${'<%- courseware_title %>'}</a>)