From 560fa6689d24a95ff194b3c698d997d3ee28a4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Sun, 26 Nov 2023 12:53:54 +0100 Subject: [PATCH] fix: add show fields in gen.live (#118) --- priv/templates/ash_phoenix.gen.live/show.ex.eex | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/priv/templates/ash_phoenix.gen.live/show.ex.eex b/priv/templates/ash_phoenix.gen.live/show.ex.eex index a76229b..c9eca8a 100644 --- a/priv/templates/ash_phoenix.gen.live/show.ex.eex +++ b/priv/templates/ash_phoenix.gen.live/show.ex.eex @@ -16,6 +16,12 @@ defmodule <%= inspect Module.concat(@web_module, @resource_alias) %>Live.Show do <% end %> + <.list> + <%= for attribute <- @attrs do %> + <:item title="<%= Phoenix.Naming.humanize(attribute.name) %>"><%%= @<%= @resource_singular %>.<%= attribute.name %> %> + <% end %> + + <.back navigate={~p"<%= @route_prefix %>"}>Back to <%= @resource_plural %> <%= if @update_action do %>