katbin/lib/ketbin_web/templates/paste/index.html.heex
SphericalKat 9b18d5186d
refactor(paste): switch to heex templates
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-10-07 05:42:24 +05:30

29 lines
701 B
Plaintext

<h1>Listing Pastes</h1>
<table>
<thead>
<tr>
<th>Is url</th>
<th>Content</th>
<th></th>
</tr>
</thead>
<tbody>
<%= for paste <- @pastes do %>
<tr>
<td><%= paste.is_url %></td>
<td><%= paste.content %></td>
<td>
<span><%= link "Show", to: Routes.paste_path(@conn, :show, paste) %></span>
<span><%= link "Edit", to: Routes.paste_path(@conn, :edit, paste) %></span>
<span><%= link "Delete", to: Routes.paste_path(@conn, :delete, paste), method: :delete, data: [confirm: "Are you sure?"] %></span>
</td>
</tr>
<% end %>
</tbody>
</table>
<span><%= link "New Paste", to: Routes.paste_path(@conn, :new) %></span>