Current section
Files
Jump to
Current section
Files
priv/templates/use_case.gen.phx_resource_html/temple/index.html.eex
h1 gettext("Listing <%= @schema.human_plural %>")
table do
thead do
tr do
<%= for {k, _} <- @schema.attrs do %>
th gettext("<%= Phoenix.Naming.humanize(Atom.to_string(k)) %>")<% end %>
th ""
end
end
tbody do
for <%= @schema.singular %> <- @<%= @schema.plural %> do
tr do
<%= for {k, _} <- @schema.attrs do %>
td <%= @schema.singular %>.<%= k %><% end %>
td do
span link(gettext("Show"), to: Routes.<%= @schema.route_helper %>_path(@conn, :show, <%= @schema.singular %>))
span link(gettext("Edit"), to: Routes.<%= @schema.route_helper %>_path(@conn, :edit, <%= @schema.singular %>))
span link(gettext("Delete"), to: Routes.<%= @schema.route_helper %>_path(@conn, :delete, <%= @schema.singular %>), method: :delete, data: [confirm: gettext("Are you sure?")])
end
end
end
end
end
span link(gettext("New <%= @schema.human_singular %>"), to: Routes.<%= @schema.route_helper %>_path(@conn, :new))