Current section

Files

Jump to
phoenix_slime priv templates phx.gen.html index.html.eex
Raw

priv/templates/phx.gen.html/index.html.eex

h1 Listing <%= schema.human_plural %>
table
thead
tr
<%= for {k, _} <- schema.attrs do %> th <%= Phoenix.Naming.humanize(Atom.to_string(k)) %>
<% end %> th
tbody
= for <%= schema.singular %> <- @<%= schema.plural %> do
tr
<%= for {k, _} <- schema.attrs do %> td= <%= schema.singular %>.<%= k %>
<% end %> td class="text-right"
= link "Show", to: Routes.<%= schema.route_helper %>_path(@conn, :show, <%= schema.singular %>)
= link "Edit", to: Routes.<%= schema.route_helper %>_path(@conn, :edit, <%= schema.singular %>)
= link "Delete", to: Routes.<%= schema.route_helper %>_path(@conn, :delete, <%= schema.singular %>), method: :delete, data: [confirm: "Are you sure?"]
span= link "New <%= schema.human_singular %>", to: Routes.<%= schema.route_helper %>_path(@conn, :new)