docbrown/app/views/admin/response_templates/index.html.erb
ludwiczakpawel bf8e2e53f1
Titles & subtitles cleanup (#10508)
* .

* .

* .
2020-10-02 12:37:39 +02:00

34 lines
1 KiB
Text

<header class="flex items-center mb-6">
<h2 class="crayons-title">Response templates</h2>
<a href="<%= new_admin_response_template_path %>" class="btn btn-primary ml-auto" role="button">Create new template</a>
</header>
<%= paginate @response_templates %>
<table class="crayons-table" width="100%">
<thead>
<tr>
<th scope="col">Title</th>
<th scope="col">Type Of</th>
<th scope="col">User ID</th>
</tr>
</thead>
<tbody class="crayons-card">
<% @response_templates.each do |response_template| %>
<tr>
<td>
<a href="<%= edit_admin_response_template_path(response_template.id) %>"><%= response_template.title %>
</td>
<td>
<%= response_template.type_of %>
</td>
<td>
<% if response_template.user_id.present? %>
<a href="<%= admin_user_path(response_template.user_id) %>"><%= response_template.user_id %></a>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @response_templates %>