docbrown/app/views/articles/edit.html.erb

33 lines
1.4 KiB
Text

<% title "Edit Post" %>
<% if @article.video.present? %>
<div class="article-form-video-preview">
<% if @article.video_state == "PROGRESSING" %>
<h1 style="color:#062144;margin-top:1.1em">⏳ Video Transcoding In Progress ⏳</h1>
<img src="https://media.giphy.com/media/tXL4FHPSnVJ0A/giphy.gif" style="border-radius:12px;height:317px" alt="Bored kid incessantly tapping his fingers">
<div style="max-width:500px;margin:18px auto 0px;font-size:0.8em;">
<p>
<strong>You'll get an email when this process finishes.</strong>
</p>
<p>
<em>This is an ordinary unpublished post. Add title/tags/body/etc, and then mark as published after the video
is done processing.</em>
</p>
</div>
<% elsif @article.video_state == "COMPLETED" %>
<br /><br />
<%= render "articles/video_player", meta_tags: false, article: @article %>
<div class="article-form-video-image-url">
<%= form_for(@article) do |f| %>
Preview Image URL: <%= f.text_field :video_thumbnail_url, placeholder: "New Thumbnail URL" %>
<%= f.submit "Submit Change", class: "cta" %>
<% end %>
</div>
<% end %>
</div>
<% end %>
<%= render "shared/webcomponents_loader_script" %>
<%= render "articles/v2_form", article: @article, organizations: @organizations, version: @version %>
<%= javascript_packs_with_chunks_tag "clipboardCopy", "articleForm", defer: true %>