<% if current_user && (current_user.admin? || current_user.moderator?) %>
<%= link_to t('add_an_article'), help_center.new_support_thread_path, class: "btn btn-outline-primary btn-block" %>
<% end %>
<% SupportCategory.sorted.each do |category| %>
<%= support_link_to help_center.support_category_support_threads_path(category) do %>
<%= category.name %>
<% end %>
<% if @category.present? && @category == category %>
<% @support_threads.each do |thread| %>
<%= support_link_to help_center.support_thread_path(thread) do %>
<%= thread.title %>
<% end %>
<% 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 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 %>