50 lines
2.1 KiB
Plaintext
50 lines
2.1 KiB
Plaintext
<%= link_to t("admin.dashboard.actions.index.create"),
|
|
new_admin_dashboard_action_path, class: 'button success float-right' %>
|
|
|
|
<h2 class="inline-block">
|
|
<%= t("admin.dashboard.actions.index.title") %>
|
|
</h2>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("admin.dashboard.actions.index.action_title") %></th>
|
|
<th><%= t("admin.dashboard.actions.index.action_type") %></th>
|
|
<th class="text-center"><%= t("admin.dashboard.actions.index.action_active") %></th>
|
|
<th class="text-center"><%= t("admin.dashboard.actions.index.day_offset") %></th>
|
|
<th class="text-center"><%= t("admin.dashboard.actions.index.required_supports") %></th>
|
|
<th class="text-center"><%= t("admin.dashboard.actions.index.order") %></th>
|
|
<th class="text-right"><%= t("admin.actions.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% if @dashboard_actions.empty? %>
|
|
<tr>
|
|
<td colspan="100%"><%= t("admin.dashboard.actions.index.no_records") %></td>
|
|
</tr>
|
|
<% end %>
|
|
|
|
<% @dashboard_actions.each do |action| %>
|
|
<tr id="<%= dom_id(action) %>">
|
|
<td><%= action.title %></td>
|
|
<td><%= t("admin.dashboard.actions.action_type.#{action.action_type}") %></td>
|
|
<td class="text-center"><%= active_human_readable(action.active) %></td>
|
|
<td class="text-center"><%= number_with_delimiter(action.day_offset, delimiter: '.') %></td>
|
|
<td class="text-center"><%= number_with_delimiter(action.required_supports, delimiter: '.') %></td>
|
|
<td class="text-center"><%= action.order %></td>
|
|
<td class="text-right">
|
|
<%= link_to t("admin.dashboard.actions.index.edit"),
|
|
edit_admin_dashboard_action_path(action),
|
|
class: "button hollow" %>
|
|
<%= link_to t("admin.dashboard.actions.index.delete"),
|
|
admin_dashboard_action_path(action),
|
|
method: :delete,
|
|
class: "button hollow alert",
|
|
data: { confirm: t("admin.actions.confirm") } %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|