642506e79e
I find it helpful (especially when going through a long list of results) to know how far back in time I'm looking. A note on the timestamp being used: it's the search index timestamp. Using the card or comment `updated_at` is fraught because we do so much touching of records (e.g., comment is touched when a reaction is added; card is touched when a comment is added). Let's display the search record's `created_at`, which is the ordering used for the overall results.
22 lines
810 B
Plaintext
22 lines
810 B
Plaintext
<li>
|
|
<%= link_to result.source, class: "search__result", data: { turbo_frame: "_top", action: "bar#reset" } do %>
|
|
<div>
|
|
<h3 class="search__title txt--medium margin-none">
|
|
# <%= result.card.number %> <%= result.card_title %>
|
|
</h3>
|
|
|
|
<% if result.comment.present? %>
|
|
<div class="search__excerpt search__excerpt--comment">
|
|
<%= avatar_preview_tag result.card.creator %>
|
|
<div><%= result.comment_body %></div>
|
|
</div>
|
|
<% elsif result.card_id.present? %>
|
|
<div class="search__excerpt"><%= result.card_description %></div>
|
|
<% end %>
|
|
</div>
|
|
<div class="overflow-ellipsis translucent txt-ink">
|
|
<%= result.card.board.name %> · <%= local_datetime_tag(result.created_at, style: :timeordate) %>
|
|
</div>
|
|
<% end %>
|
|
</li>
|