Commit a2f9e4d5 by Your Name

almost there

parent 74501280
......@@ -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"
......
......@@ -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:
......
......@@ -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>)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment