docbrown/app/views/articles/_comments_actions.html.erb
Andy Zhao 71157c993e Hide comment feature (#4944)
* Add MVP of hide comment feature

* Slight copy adjustments

* Remove unused file oops

* Fix strange styling issues

* Add hide/unhide comment specs

* Authenticate user for hide/unhide

* Add tests for hide/unhide functionality

* Remove opacity CSS for hidden comments

* Fix hidden comment explanation logic

* Fix some styling issues

* Fix hiding top level comment logic

* Show only hidden comments in permalink and not thread

* Hide subtree properly if hidden comment

* Fix weird CSS issue

* Properly hide comments for permalink view

* Show children comments in permalink view

* Add tests for comment hiding visibility

* Remove superfluous code and adjust copy

* Remove some more logical duplication

* Add dedicated article column for any comments hidden

* Add reload in test
2019-12-10 15:09:47 -05:00

17 lines
572 B
Text

<div>
<% if @comments_to_show_count && @article.comments_count > @comments_to_show_count %>
<a class="full-discussion-button"
href="<%= @article.path %>/comments">
VIEW FULL DISCUSSION (<%= @article.comments_count %> COMMENTS)
</a>
<% end %>
<% if @article.any_comments_hidden %>
<div class="comments-hidden-message">
<p>
Some comments have been hidden by the post's author - <a href="/faq">find out more</a>
</p>
</div>
<% end %>
<%= render "articles/conduct_and_abuse_actions", page: "articles_show" %>
</div>