<% @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 btn--reversed", 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/card", bubble: @bubble %>
<%= render "bubbles/color", bubble: @bubble %> <%= render "bubbles/image", bubble: @bubble %> <%= button_to bucket_bubble_path(@bubble.bucket, @bubble), method: :delete, class: "btn", data: { turbo_confirm: "Are you sure you want to delete this?" } do %> <%= image_tag "trash.svg", aria: { hidden: true }, size: 24 %> Delete <% end %>
<% if @bubble.published? %>
<%= turbo_frame_tag dom_id(@bubble, :watch), src: bucket_bubble_watch_path(@bubble.bucket, @bubble) %> <%= turbo_frame_tag dom_id(@bubble, :pin), src: bucket_bubble_pin_path(@bubble.bucket, @bubble) %>
<% end %>
<% 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->outlet-auto-save#change focusout->outlet-auto-save#submit", uploads_url: uploads_url(format: "json") } %>
<% end %> <% if @bubble.creating? %>
<%= button_to "Create card", bucket_bubble_publish_path(@bubble.bucket, @bubble), class: "btn btn--reversed" %> <%= button_to "Save as draft", bucket_bubble_path(@bubble.bucket, @bubble), name: "bubble[status]", value: "drafted", method: :put, class: "btn" %>
<% end %>
<%= link_to "Go back", bubbles_path(bucket_ids: [ @bubble.bucket ]), class: "btn", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" }, hidden: true %> <%= render "notifications/tray" %> <%= render "bubbles/pins/tray" %>