diff --git a/common/static/common/js/discussion/views/discussion_thread_view.js b/common/static/common/js/discussion/views/discussion_thread_view.js index 5544e8fb52..e531523044 100644 --- a/common/static/common/js/discussion/views/discussion_thread_view.js +++ b/common/static/common/js/discussion/views/discussion_thread_view.js @@ -280,6 +280,9 @@ responseCountFormat = ngettext( '{numResponses} other response', '{numResponses} other responses', responseTotal ); + if (responseTotal === 0) { + this.$el.find('.response-count').hide(); + } } else { responseCountFormat = ngettext( '{numResponses} response', '{numResponses} responses', responseTotal @@ -288,6 +291,7 @@ this.$el.find('.response-count').text( edx.StringUtils.interpolate(responseCountFormat, {numResponses: responseTotal}, true) ); + responsePagination = this.$el.find('.response-pagination'); responsePagination.empty(); if (responseTotal > 0) { @@ -327,6 +331,8 @@ }); return responsePagination.append($loadMoreButton); } + } else { + this.$el.find('.add-response').hide(); } }; @@ -345,9 +351,9 @@ DiscussionThreadView.prototype.renderAddResponseButton = function() { if (this.model.hasResponses() && this.model.can('can_reply') && !this.model.get('closed')) { - return this.$el.find('div.add-response').show(); + return this.$el.find('.add-response').show(); } else { - return this.$el.find('div.add-response').hide(); + return this.$el.find('.add-response').hide(); } }; diff --git a/common/static/common/templates/discussion/thread-show.underscore b/common/static/common/templates/discussion/thread-show.underscore index 5055f5be29..471e87f218 100644 --- a/common/static/common/templates/discussion/thread-show.underscore +++ b/common/static/common/templates/discussion/thread-show.underscore @@ -1,7 +1,7 @@