docbrown/app/views/articles/edit.html.erb
Ben Halpern 302e8f202d
Add HTML variants for cta optimization and other nav bar adjustments (#970)
* Add HTML variants for cta optimization and other nav bar adjustments

* Fix 1==1 non-random mistake

* Spruce up org call-to-action

* Change default text color

* Add html variant trial and success request specs

* Fix article sidebar caching issue

* One line adjustment

* Modify schema

* Add include ActionView::Helpers::TagHelper to user_tag_spec

* Modify follow_button to remove session context

* Dummy commit

* Change Edit Article to Edit Post

* Dummy commit

* Fix rubocop concerns

* Fix rubocop style
2018-10-22 17:03:57 -04:00

38 lines
1.5 KiB
Text

<% title "Edit Post" %>
<% if @article.video.present? %>
<div style="text-align:center;padding-top:60px;margin:auto;max-width:880px;margin-bottom:-50px;">
<% 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" />
<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 style="padding-top:15px;">
<%= form_for(@article) do |f| %>
Change preview image (via URL): <%= f.text_field :video_thumbnail_url, placeholder: "New Thumbnail URL" %>
<%= f.submit "Submit Change" %>
<% end %>
<h5>Video is in beta ❤️</h5>
</div>
<% end %>
</div>
<% end %>
<% unless @article.has_frontmatter? %>
<%= javascript_pack_tag 'articleForm', defer: true %>
<%= render 'articles/v2_form' %>
<% else %>
<%= render 'articles/markdown_form' %>
<% end %>