Current section

Files

Jump to
phoenix priv templates html index.html.eex
Raw

priv/templates/html/index.html.eex

<h2>Listing <%= plural %></h2>
<table class="table">
<thead>
<tr>
<%= for {k, _} <- inputs do %> <th><%= Phoenix.Naming.camelize(k) %></th>
<% end %>
<th></th>
</tr>
</thead>
<tbody>
<%= "<%=" %> for <%= singular %> <- @<%= plural %> do <%= "%\>" %>
<tr>
<%= for {k, _} <- inputs 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, class: "btn btn-danger btn-xs" <%= "%\>" %>
</td>
</tr>
<%% end %>
</tbody>
</table>
<%= "<%=" %> link "New <%= singular %>", to: <%= singular %>_path(@conn, :new) %>