Files
grecia/app/views/admin/milestone_statuses/index.html.erb
Javi Martín 27522f60e7 Remove unneeded GET method
Links already use GET by default, so there's no need to specify it.
Furthermore, using `method: :get` makes a link incompatible with
turbolinks.
2019-10-05 03:38:44 +02:00

42 lines
1.3 KiB
Plaintext

<h2 class="inline-block"><%= t("admin.statuses.index.title") %></h2>
<%= link_to t("admin.statuses.index.new_status"),
new_admin_milestone_status_path,
class: "button float-right margin-right" %>
<% if @statuses.any? %>
<table>
<thead>
<tr>
<th><%= t("admin.statuses.index.table_name") %></th>
<th><%= t("admin.statuses.index.table_description") %></th>
<th><%= t("admin.statuses.index.table_actions") %></th>
</tr>
</thead>
<tbody>
<% @statuses.each do |status| %>
<tr id="<%= dom_id(status) %>" class="milestone_status">
<td>
<%= status.name %>
</td>
<td>
<%= status.description %>
</td>
<td>
<%= link_to t("admin.statuses.index.edit"),
edit_admin_milestone_status_path(status),
class: "button hollow" %>
<%= link_to t("admin.statuses.index.delete"),
admin_milestone_status_path(status),
method: :delete, class: "button hollow alert" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<div data-alert class="callout primary margin-top clear">
<%= t("admin.statuses.index.empty_statuses") %>
</div>
<% end %>