app/views/server/emergency_messages/index.html.erb
<% content_for :title, "#{@emergency_messages.total_count} #{EmergencyMessage.model_name.human(count: @emergency_messages.total_count).downcase}" %>
<div class="row g-2 mb-3">
<% @emergency_messages.each do |emergency_message| %>
<div>
<div class="card card--horizontal">
<div class="card-body">
<%= link_to emergency_message, [:server, emergency_message] %><br>
</div>
<div class="card-footer">
<% if emergency_message.delivered? %>
<%= l(emergency_message.delivered_at) %>
<% else %>
<%= link_to t('edit'),
[:edit, :server, emergency_message],
class: button_classes %>
<%= link_to t('delete'),
[:server, emergency_message],
method: :delete,
data: { confirm: t('please_confirm') },
class: button_classes_danger %>
<% end %>
</div>
</div>
</div>
<% end %>
</div>
<%= paginate @emergency_messages %>
<% content_for :action_bar_right do %>
<%= link_to t('create'), new_server_emergency_message_path, class: button_classes %>
<% end %>