<%= ts("Preview") %>

<%= error_messages_for :work %>
<%= render "works/work_header" %>
<% if @chapters %> <% @chapters.each do |chapter| %> <%= render "chapters/chapter", chapter: chapter %> <% end %> <% else %>
<%=raw sanitize_field(@chapter, :content) %>
<% end %>
<% inspired_by = get_inspired_by(@work) %> <% if !@work.endnotes.blank? || !@work.serial_works.blank? || !inspired_by.empty? %>
<% unless @work.endnotes.blank? %> <%= render "works/work_endnotes" %> <% end %> <% unless @work.serial_works.blank? %> <%= render "works/work_series_links" %> <% end %> <% unless inspired_by.empty? %> <%= render "works/work_approved_children", inspired_by: inspired_by %> <% end %>
<% end %>
<%= form_for(@work) do |f| %> <%= render "hidden_fields", form: f %>
<%= ts("Post Work") %>

<%= t(".post_notice_html", content_policy_link: link_to(t(".content_policy"), content_path), tos_faq_link: link_to(t(".tos_faq"), tos_faq_path(anchor: "content_faq"))) %>

<% end %>