'Reported' -> 'Added'

This commit is contained in:
Jason Zimdars
2025-04-30 10:29:16 +02:00
parent dabec3e124
commit 6ed5549c1b
6 changed files with 16 additions and 6 deletions
+10
View File
@@ -38,4 +38,14 @@ module CardsHelper
concat(tag.span("Delete this card"))
end
end
def card_title_tag(card)
title = [
card.title,
"added by #{card.creator.name}",
"in #{card.collection.name}"
]
title << "assigned to #{card.assignees.map(&:name).to_sentence}" if card.assignees.any?
title.join(" ")
end
end
+1 -1
View File
@@ -11,7 +11,7 @@
<%= card.title %>
</h1>
<%= link_to collection_card_path(card.collection, card), class: "card__link", data: { turbo_frame: "_top" } do %>
<%= link_to collection_card_path(card.collection, card), class: "card__link", title: card_title_tag(card), data: { turbo_frame: "_top" } do %>
<span class="for-screen-reader"><%= card.title %></span>
<% end %>
</div>
@@ -17,7 +17,7 @@
<% end %>
</span>
<span class="card__meta-item card__meta-item--reported overflow-ellipsis">
Reported by <strong><%= card.creator.familiar_name %></strong>
Added by <strong><%= card.creator.familiar_name %></strong>
</span>
<span class="card__meta-item card__meta-item--assigned overflow-ellipsis">
<%= card.assignees.any? ? "Assigned to" : "Not assigned" %>
@@ -10,7 +10,7 @@
<div class="popup__group flex align-center full-width gap-half overflow-ellipsis">
<%= link_to cards_path(creator_ids: [Current.user.id]), class: "btn popup__new popup__item", style: "view-transition-name: new-collection" do %>
<%= icon_tag "filter" %>
<span class="overflow-ellipsis">Reported by me</span>
<span class="overflow-ellipsis">Added by me</span>
<span class="translucent flex-item-no-shrink flex-item-justify-end"> </span>
<% end %>
</div>
+2 -2
View File
@@ -4,9 +4,9 @@
<button class="btn input input--select flex-inline txt-x-small" data-action="click->dialog#open:stop">
<span class="overflow-ellipsis">
<% if filter.creators.any? %>
<%= "Reported by #{filter.creators.map(&:familiar_name).to_sentence}" %>
<%= "Added by #{filter.creators.map(&:familiar_name).to_sentence}" %>
<% else %>
Reported by…
Added by…
<% end %>
</span>
</button>
+1 -1
View File
@@ -33,7 +33,7 @@
<div class="flex-inline center justify-center flex-wrap gap">
<%= link_to "See cards assigned to #{ Current.user == @user ? "you" : @user.first_name }", cards_path(assignee_ids: [@user.id], indexed_by: "newest"), class: "btn", data: { turbo_frame: "_top" } %>
<%= link_to "See cards reported by #{ Current.user == @user ? "you" : @user.first_name }", cards_path(creator_ids: [@user.id], indexed_by: "newest"), class: "btn", data: { turbo_frame: "_top" } %>
<%= link_to "See cards added by #{ Current.user == @user ? "you" : @user.first_name }", cards_path(creator_ids: [@user.id], indexed_by: "newest"), class: "btn", data: { turbo_frame: "_top" } %>
</div>
</div>
</div>