diff --git a/lms/static/coffee/src/discussion/content.coffee b/lms/static/coffee/src/discussion/content.coffee index 448b092045..c5931ddda5 100644 --- a/lms/static/coffee/src/discussion/content.coffee +++ b/lms/static/coffee/src/discussion/content.coffee @@ -265,7 +265,7 @@ initializeFollowThread = (thread) -> $threadTitle = $local(".thread-title") $showComments = $local(".discussion-show-comments") - if not $showComments.length or not $threadTitle.length + if not $showComments.hasClass("first-time") and (not $showComments.length or not $threadTitle.length) return rebindHideEvents = -> @@ -277,7 +277,7 @@ initializeFollowThread = (thread) -> $showComments.html prevHtml.replace "Show", "Hide" - if $content.children(".comments").length + if not $showComments.hasClass("first-time") and $content.children(".comments").length $content.children(".comments").show() rebindHideEvents() else @@ -294,6 +294,7 @@ initializeFollowThread = (thread) -> $content.find(".comment").each (index, comment) -> Discussion.initializeContent(comment) Discussion.bindContentEvents(comment) + $showComments.removeClass("first-time") rebindHideEvents() Discussion.bindLocalEvents $local, diff --git a/lms/templates/discussion/_thread.html b/lms/templates/discussion/_thread.html index a9a354225f..45ba3513d3 100644 --- a/lms/templates/discussion/_thread.html +++ b/lms/templates/discussion/_thread.html @@ -134,8 +134,8 @@
% if content.get('comments_count', -1) >= 0: - % if kwargs.get('show_comments') is True: - Hide ${content['comments_count']} ${pluralize('comment', content['comments_count'])} + % if discussion_type == 'user': + Show all comments (${content['comments_count']} total) % else: Show ${content['comments_count']} ${pluralize('comment', content['comments_count'])} % endif