<% @page_title = @bubble.title %> <% content_for :header do %> <% if @bubble.creating? && @bubble.can_recover_abandoned_creation? %>
You have an unsaved work. Would you like to continue where you left off? <%= button_to bucket_bubble_recover_path(@bubble.bucket, @bubble), class: "btn txt-small btn--link", data: { turbo_action: "replace" } do %> Restore <% end %>
<% end %> <% if @bubble.drafted? %>
This is a draft, it’s only visible to you. <%= render "bubbles/publish", bubble: @bubble %>
<% end %> <% end %>
<%= render "bubbles/bubble", bubble: @bubble %>
<% unless @bubble.drafted? || @bubble.creating? %> <%= render "bubbles/pop_toggle", bubble: @bubble %> <% end %>
<% if @bubble.published? %> <%= render "bubbles/messages", bubble: @bubble %> <% else %>
<%= tag.house_md @bubble.draft_comment, name: "bubble[draft_comment]", class: "input comment__input", form: "bubble_form", placeholder: new_comment_placeholder(@bubble), data: { action: "house-md:change->remote-auto-save#change focusout->remote-auto-save#submit", uploads_url: uploads_url(format: "json") } %>
<% end %>
<% if @bubble.creating? %>
<%= button_to "Save as draft", bucket_bubble_path(@bubble.bucket, @bubble), name: "bubble[status]", value: "drafted", method: :put, class: "btn btn--plain borderless fill-transparent" %> <%= button_to "Create bubble", bucket_bubble_publish_path(@bubble.bucket, @bubble), class: "btn btn--reversed" %>
<% end %>
<%= turbo_frame_tag dom_id(@bubble, :stage_picker), src: new_bucket_bubble_stage_picker_path(@bubble.bucket, @bubble) %>
<%= render "notifications/tray" %>