<%= content_tag :article, id: dom_id(topic), class: ['thredded--topics--topic', topic_css_classes(topic)], data: {topic: topic.id, messageboard: topic.messageboard_id} do %>
<%= topic.posts_count %>
<% if topic.followed? %> <% else %> <% end %>

<% if user_signed_in? %> <% @current_user_unread_and_followed_topics ||= Thredded::Topic.unread_followed_by(current_user).pluck(:id) if @current_user_unread_and_followed_topics.include?(topic.id) %> notifications_active <% end %> <% end %> <%= link_to topic.title, topic.path %>

<% if topic.categories.any? %> <% end %> last post <%= time_ago topic.last_post_at %> by <%= user_link topic.last_user %> <% if topic.blocked? && topic.can_moderate? %> <%= render 'thredded/shared/content_moderation_blocked_state', moderation_record: topic.last_moderation_record %> <% end %> <% end %> <% if local_assigns[:sticky_topics_divider] && !topic_iteration.last? && topic.sticky? && !topics[topic_counter + 1].sticky? %> <%= render 'thredded/topics/sticky_topics_divider' %> <% end %>