Files
fizzy/app/views/cards/show.html.erb
T
Jorge Manrubia b0aae3ad9e Reapply "Add a description field for cards"
This reverts commit a4cc143b09.
2025-04-21 16:45:24 +02:00

39 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<% @page_title = @card.title %>
<%= turbo_stream_from @card %>
<% content_for :header do %>
<% if @card.creating? && @card.can_recover_abandoned_creation? %>
<div class="fill-selected position-sticky flex align-center gap-half justify-center border-block margin-block-end"
style="view-transition-name: draft-banner; --card-color: <%= @card.color %>;">
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 %>
<span>Restore</span>
<% end %>
</div>
<% end %>
<% if @card.drafted? %>
<div class="fill-selected position-sticky flex align-center gap-half fill-highlight justify-center border-block margin-block-end"
style="view-transition-name: draft-banner;">
This is a draft, its only visible to you.
<%= button_to card_publish_path(@card), class: "btn txt-small btn--link", style: "--btn-background: #{@card.color}" do %>
<span>Post to project</span>
<% end %>
</div>
<% end %>
<nav class="align-start max-width">
<%= link_to_home %>
<%= link_to_back fallback_path: cards_path(collection_id: @card.collection) %>
</nav>
<% end %>
<div data-controller="beacon" data-beacon-url-value="<%= card_reading_url(@card) %>">
<%= render "cards/container", card: @card %>
<% if @card.published? %>
<%= render "cards/messages", card: @card %>
<% end %>
</div>