Current section
Files
Jump to
Current section
Files
priv/templates/phoenix_custom_generators.gen.html/index.html.eex
<h2>Listing <%= template_plural %></h2>
<table class="table">
<thead>
<tr>
<%= for {k, _} <- attrs do %> <th><%= Phoenix.Naming.humanize(Atom.to_string(k)) %></th>
<% end %>
<th></th>
</tr>
</thead>
<tbody>
<%= "<%=" %> for <%= singular %> <- @<%= plural %> do <%= "%\>" %>
<tr>
<%= for {k, _} <- attrs do %> <td><%= "<%=" %> <%= singular %>.<%= k %> <%= "%\>" %></td>
<% end %>
<td class="text-right">
<%= "<%=" %> link "Show", to: <%= singular %>_path(@conn, :show, <%= singular %>), class: "btn btn-default btn-xs" <%= "%\>" %>
<%= "<%=" %> link "Edit", to: <%= singular %>_path(@conn, :edit, <%= singular %>), class: "btn btn-default btn-xs" <%= "%\>" %>
<%= "<%=" %> link "Delete", to: <%= singular %>_path(@conn, :delete, <%= singular %>), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-xs" <%= "%\>" %>
</td>
</tr>
<%% end %>
</tbody>
</table>
<%= "<%=" %> link "New <%= template_singular %>", to: <%= singular %>_path(@conn, :new) %>