<% @page_title = @card.title %> <%= turbo_stream_from @card %> <% content_for :header do %> <% if @card.creating? && @card.can_recover_abandoned_creation? %>
You have an unsaved work. Would you like to continue where you left off? <%= button_to card_recover_path(@card), class: "btn btn--reversed", data: { turbo_action: "replace" } do %> Restore <% end %>
<% end %> <% if @card.drafted? %>
This is a draft, it’s only visible to you. <%= button_to card_publish_path(@card), class: "btn txt-small btn--link", style: "--btn-background: #{@card.color}" do %> Post to project <% end %>
<% end %> <%= render "cards/show/header" %> <% end %>
<%= link_to cards_path(collection_ids: [ @card.collection ]), class: "txt-large overflow-ellipsis margin-none txt-ink", style: "view-transistion-name: card-collection-title", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %> ← <%= @card.collection.name %> <% end %>
<%= render "cards/container", card: @card %> <% if @card.published? || @card.drafted? %> <%= render "cards/messages", card: @card %> <% end %>