diff --git a/lib/backpex/fields/has_many.ex b/lib/backpex/fields/has_many.ex index b1da6d8e..4373f8da 100644 --- a/lib/backpex/fields/has_many.ex +++ b/lib/backpex/fields/has_many.ex @@ -339,9 +339,9 @@ defmodule Backpex.Fields.HasMany do ~H""" <%= if is_nil(@link) do %> -
+ <%= HTML.pretty_value(@display_text) %> -
+ <% else %> <.link navigate={@link} class={["hover:underline", @live_action in [:index, :resource_action] && "truncate"]}> <%= @display_text %> diff --git a/lib/backpex/fields/many_to_many.ex b/lib/backpex/fields/many_to_many.ex index 8e61795b..ee45138a 100644 --- a/lib/backpex/fields/many_to_many.ex +++ b/lib/backpex/fields/many_to_many.ex @@ -339,9 +339,9 @@ defmodule Backpex.Fields.ManyToMany do ~H""" <%= if is_nil(@link) do %> -+ <%= HTML.pretty_value(@display_text) %> -
+ <% else %> <.link navigate={@link} class={["hover:underline", @live_action in [:index, :resource_action] && "truncate"]}> <%= @display_text %>