<!--Descriptive page name, messages and instructions-->
<h2 class="heading">
  <% if logged_in_as_admin? %>
    <%= ts("Preview Tags and Language") %>
  <% else %>
    <%= ts("Preview Tags") %>
  <% end %>
</h2>
<%= error_messages_for :work %>
<!--/descriptions-->

<!--main content-->
<div id="previewpane">
  <div class="draft work">
    <%= render 'works/meta', work: @work %>
  </div>
</div>
<!--/content-->

<%= form_for(@work, url: { action: :update_tags }) do |form| %>
  <%= form.hidden_field :rating_string, value: "#{@work.rating_string}" %>
  <%= form.hidden_field :archive_warning_string, value: "#{@work.archive_warning_string}" %>
  <%= form.hidden_field :category_string, value: "#{@work.category_string}" %>
  <%= form.hidden_field :fandom_string, value: "#{@work.fandom_string}" %>
  <%= form.hidden_field :relationship_string, value: "#{@work.relationship_string}" %>
  <%= form.hidden_field :character_string, value: "#{@work.character_string}" %>
  <%= form.hidden_field :freeform_string, value: "#{@work.freeform_string}" %>
  <% if logged_in_as_admin? %>
    <%= form.hidden_field :language_id, value: "#{@work.language.id}" %>
  <% end %>

  <fieldset>
    <legend><%= ts('Post Work') %></legend>
    <p class="submit cancel edit actions">
      <% if @work.posted? %>
        <%= submit_tag ts('Update'), name: 'update_button' %>
      <% else %>
        <%= submit_tag ts('Post'), name: 'post_button' %>
        <%= submit_tag ts('Save As Draft'), name: 'save_button' %>
      <% end %>
      <%= submit_tag ts('Edit'), name: 'edit_button' %>
      <%= submit_tag ts('Cancel'), name: 'cancel_button' %>
    </p>
  </fieldset>

<% end %>
