<% SupportCategory.sorted.each do |category| %>
<%= support_link_to help_center.support_category_path(category) do %>
<% end %>
<% threads = SupportThread.where(support_category_id: category.id).order(:position) %>
<% threads.each do |thread| %>
<%= support_link_to help_center.support_thread_path(thread) do %>
<%= thread.title %>
<% end %>
<% end %>
<% end %>
<% if HelpCenter.enable_comments %>
<%= t('filters') %>
<%= support_link_to help_center.support_threads_path, exact: true do %>
<%= icon "fa-fw fas", "bars" %>
<%= t('.all_threads') %>
<% end %>
<% if user_signed_in? %>
<%= support_link_to help_center.mine_support_threads_path do %><%= icon "fa-fw far", "user-circle" %>
<%= t('.my_questions') %>
<% end %>
<%= support_link_to help_center.participating_support_threads_path do %>
<%= icon "fa-fw far", "comments" %>
<%= t('.participating') %>
<% end %>
<% end %>
<%= support_link_to help_center.answered_support_threads_path do %>
<%= icon "fa-fw fas", "check" %>
<%= t('.answered') %>
<% end %>
<%= support_link_to help_center.unanswered_support_threads_path do %>
<%= icon "fa-fw fas", "question" %>
<%= t('.unanswered') %>
<% end %>
<% if @support_thread.present? && @support_thread.persisted? %>
<%# User has not posted in the thread or subscribed %>
<%= t('.notifications') %>
<%= link_to help_center.support_thread_notifications_path(@support_thread), method: :post, class: "btn-secondary btn-sm btn-block mb-2" do %>
<% if @support_thread.subscribed? current_user %>
<%= icon "fa-fw fas", "bell-slash" %> <%= t('.unsubscribe') %>
<% else %>
<%= icon "fa-fw fas", "bell" %>
<%= t('.suscribe') %>
<% end %>
<% end %>
<%= @support_thread.subscribed_reason(current_user) %>
<% end %>
<% end %>