Files
fizzy/app/views/cards/display/_preview.html.erb
T
Mike Dalessio 28ed744d0c refactor: Extract a Card::Entropy concern
to encompass behavior related to auto-closing and auto-reconsidering.

Note that putting this code in a single place reveals an asymmetry
between the actions:

- Auto-closing period is an optional attribute of a collection
- Auto-reconsidering period is hard-coded to 30 days for all collections
2025-06-01 16:50:12 -04:00

41 lines
1.4 KiB
Plaintext

<% cache card do %>
<%= card_article_tag card, class: "card" do %>
<div class="flex gap">
<div class="flex flex-column flex-item-grow">
<header class="card__header">
<span class="card__collection">
<span class="card__id"><%= card.id %></span>
<%= link_to card.collection.name, cards_path(collection_ids: [ card.collection ]),
class: "card__collection-name overflow-ellipsis" %>
</span>
<%= render "cards/display/preview/tags", card: card %>
</header>
<div class="card__body justify-space-between">
<div class="card__content">
<h1 class="card__title overflow-line-clamp">
<%= card.title %>
</h1>
<%= link_to collection_card_path(card.collection, card), class: "card__link", title: card_title_tag(card), data: { action: "dialog#close", turbo_frame: "_top" } do %>
<span class="for-screen-reader"><%= card.title %></span>
<% end %>
</div>
</div>
</div>
<%= render "cards/stagings/stages", card: card if card.doing? %>
</div>
<footer class="card__footer">
<%= render "cards/display/preview/meta", card: card %>
</footer>
<%= render "cards/display/common/background", card: card %>
<% if card.subject_to_entropy? %>
<%= render "cards/display/preview/bubble", card: card %>
<% end %>
<% end %>
<% end %>