30 lines
633 B
Plaintext
30 lines
633 B
Plaintext
|
<h1>Listing templates</h1>
|
||
|
|
||
|
<table>
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Title</th>
|
||
|
<th>Author</th>
|
||
|
<th></th>
|
||
|
<th></th>
|
||
|
<th></th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
|
||
|
<tbody>
|
||
|
<% @templates.each do |template| %>
|
||
|
<tr>
|
||
|
<td><%= template.title %></td>
|
||
|
<td><%= template.author %></td>
|
||
|
<td><%= link_to 'Show', template %></td>
|
||
|
<td><%= link_to 'Edit', edit_template_path(template) %></td>
|
||
|
<td><%= link_to 'Destroy', template, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||
|
</tr>
|
||
|
<% end %>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
<%= link_to 'New Template', new_template_path %>
|