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

29 lines
686 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>Content</th>
<th></th>
</tr>
</thead>
<tbody>
<%= for page <- @pages do %>
<tr>
<td><%= page.title %></td>
<td><%= page.content %></td>
<td>
<span><%= link "Show", to: Routes.page_path(@conn, :show, page) %></span>
<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>