diff --git a/app/helpers/cards_helper.rb b/app/helpers/cards_helper.rb index 79338d622..08edb27d9 100644 --- a/app/helpers/cards_helper.rb +++ b/app/helpers/cards_helper.rb @@ -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 diff --git a/app/views/cards/display/_preview.html.erb b/app/views/cards/display/_preview.html.erb index a909089cb..aa4e14dcf 100644 --- a/app/views/cards/display/_preview.html.erb +++ b/app/views/cards/display/_preview.html.erb @@ -11,7 +11,7 @@ <%= card.title %> - <%= 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 %> <%= card.title %> <% end %> diff --git a/app/views/cards/display/common/_meta.html.erb b/app/views/cards/display/common/_meta.html.erb index 8cc20f2e5..86640f3cc 100644 --- a/app/views/cards/display/common/_meta.html.erb +++ b/app/views/cards/display/common/_meta.html.erb @@ -17,7 +17,7 @@ <% end %> - Reported by <%= card.creator.familiar_name %> + Added by <%= card.creator.familiar_name %> <%= card.assignees.any? ? "Assigned to" : "Not assigned" %> diff --git a/app/views/events/filter/_custom_collections.html.erb b/app/views/events/filter/_custom_collections.html.erb index f3a07e15e..0c1f056e5 100644 --- a/app/views/events/filter/_custom_collections.html.erb +++ b/app/views/events/filter/_custom_collections.html.erb @@ -10,7 +10,7 @@ diff --git a/app/views/filters/_creators.html.erb b/app/views/filters/_creators.html.erb index ab203d063..d6dbd31fa 100644 --- a/app/views/filters/_creators.html.erb +++ b/app/views/filters/_creators.html.erb @@ -4,9 +4,9 @@ diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 9472926f4..d061814d2 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -33,7 +33,7 @@
<%= 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" } %>