11df9c3589
Three changes needed to support navigating back from a card to the activity page: - Add root_path to the prefer_referrer allowlist on the card show page - Switch event links from HTML target="_top" to data-turbo-frame="_top" so Turbo handles the navigation and turbo:before-visit fires to save the referrer - Normalize trailing slashes in the referrer path comparison so /account_id and /account_id/ both match ref: https://app.fizzy.do/5986089/cards/2390
27 lines
820 B
Plaintext
27 lines
820 B
Plaintext
<% @page_title = @card.title %>
|
|
<% @header_class = "header--card" %>
|
|
|
|
<% content_for :head do %>
|
|
<%= card_social_tags(@card) %>
|
|
<% end %>
|
|
|
|
<% content_for :header do %>
|
|
<div class="header__actions header__actions--start">
|
|
<%= link_back_to_board @card.board, prefer_referrer: [ root_path, cards_path, board_path(@card.board) ] %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= turbo_stream_from @card %>
|
|
<%= turbo_stream_from @card, :activity %>
|
|
|
|
<div data-controller="beacon lightbox" data-beacon-url-value="<%= card_reading_path(@card) %>">
|
|
<%= render "cards/container", card: @card %>
|
|
<%= render "cards/messages", card: @card %>
|
|
|
|
<%= render "layouts/lightbox" do %>
|
|
<%= button_to_remove_card_image(@card) if @card.image.attached? %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<%= bridged_share_url_button(bridge_share_card_description(@card)) %>
|