wiki/lib/wiki_web/templates/page/index.html.eex

26 lines
593 B
Elixir
Raw Normal View History

2020-07-30 00:49:51 +00:00
<h1>Listing Pages</h1>
<table>
<thead>
<tr>
<th>Title</th>
<th></th>
</tr>
</thead>
<tbody>
<%= for page <- @pages do %>
<tr>
2020-08-02 22:26:16 +00:00
<td><%= link page.title, to: Routes.page_path(@conn, :show, page) %></td>
2020-07-30 00:49:51 +00:00
<td>
<span><%= link "Edit", to: Routes.page_path(@conn, :edit, page) %></span>
<span><%= link "Delete", to: Routes.page_path(@conn, :delete, page), method: :delete, data: [confirm: "Are you sure?"] %></span>
</td>
</tr>
<% end %>
</tbody>
</table>
<span><%= link "New Page", to: Routes.page_path(@conn, :new) %></span>