<%= link_to help_center_path, class: "button is-muted" do %>
  &laquo; Back to help center
<% end %>
<% unless @post.nil? %>
  <% if (moderator? && @post.post_type_id == HelpDoc.post_type_id) || (admin? && @post.post_type_id == PolicyDoc.post_type_id) %>
    <%= link_to 'edit', edit_help_post_path(@post), class: "button is-outlined is-muted" %>
  <% end %>
<% end %>

<% if @post.help_category == '$Moderator' %>
  <div class="notice is-warning">
    <i class="fas fa-exclamation-circle"></i> This help article is only available to moderators.
  </div>
<% end %>

<h1><%= @post.nil? ? 'This document has not been created yet' : @post.title %></h1>
<% if @post.nil? %>
  <p>There's meant to be a helpful document here, but the administrator of this site hasn't created it yet.</p>
<% else %>
  <%= raw(sanitize(@post.body, scrubber: scrubber)) %>
<% end %>
