% if version.processing_failed? %>
There was a problem creating the new preview version of this post for editing.
<% version.cloning_errors.each do |error| %>
- <%= error %>
<% end %>
<% elsif version.processing? %>
Processing Preview for <%= version.title %>
<%= ajax_link_attrs(dom_target(version.post, :preview_version)) %> >
If the preview does not appear within a few minutes, click here to see if it's available.
<%= ajax_link "refresh preview", edit_version_path(version), {}, dom_target(version.post, :preview_version) %>
<% elsif version.preview? %>
>▸
>▾
Slug
>
<%= render partial: 'pulitzer/posts/slug_wrapper', locals: { post: version.post, version: version } %>
>
<% Pulitzer::Post::TAG_MODELS.each do |tag_model| %>
<%= render partial: 'pulitzer/post_tags/show_wrapper', locals: { version: version, tag_model: tag_model } %>
<% end %>
<% version.all_elements.each do |element| %>
<%= render partial: "/pulitzer/#{element.class.table_name.gsub(/pulitzer_/,'')}/show_wrapper", locals: { element: element } %>
<% end %>
<%= render partial: 'pulitzer/versions/form', locals: { version: version } %>
<% if @preview_path %>
<%= link_to "Preview", @preview_path, target: '_blank' %>
<% else %>
Preview not available
<% end %>
<% end %>