diff --git a/lms/static/coffee/src/discussion/views/response_comment_show_view.coffee b/lms/static/coffee/src/discussion/views/response_comment_show_view.coffee index 65150e0260..d0de32bd7a 100644 --- a/lms/static/coffee/src/discussion/views/response_comment_show_view.coffee +++ b/lms/static/coffee/src/discussion/views/response_comment_show_view.coffee @@ -7,12 +7,6 @@ if Backbone? @template = _.template($("#response-comment-show-template").html()) params = @model.toJSON() - # Only things that are nested under comments get parents - params['deep'] = @model.hasOwnProperty('parent') - if @model.hasOwnProperty('parent') - params['parent_id'] = @model.parent.id - params['parent_username'] = @model.parent.get('username') - @$el.html(@template(params)) @initLocal() @delegateEvents() @@ -20,8 +14,15 @@ if Backbone? @markAsStaff() @$el.find(".timeago").timeago() @convertMath() + @addReplyLink() @ + addReplyLink: () -> + if @model.hasOwnProperty('parent') + html = "@#{@model.parent.get('username')}: " + p = @$('.response-body p:first') + p.prepend(html) + convertMath: -> body = @$el.find(".response-body") body.html DiscussionUtil.postMathJaxProcessor DiscussionUtil.markdownWithHighlight body.html() diff --git a/lms/templates/discussion/_underscore_templates.html b/lms/templates/discussion/_underscore_templates.html index ce64b5226b..ea70ac2910 100644 --- a/lms/templates/discussion/_underscore_templates.html +++ b/lms/templates/discussion/_underscore_templates.html @@ -118,9 +118,6 @@