mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
22 lines
976 B
Text
22 lines
976 B
Text
<% content_for :title, "Notifications" %>
|
|
<div class="flex flex-col items-center w-full">
|
|
<div class="text-center mb-6">
|
|
<h1 class="font-bold text-4xl mb-4">Notifications</h1>
|
|
<div class="flex items-center justify-center mb-4">
|
|
<% if @notifications.unread.any? %>
|
|
<%= link_to "Mark all as read", mark_notifications_as_read_path, method: :post, data: { turbo_method: :post }, class: "btn btn-sm btn-primary" %>
|
|
<% end %>
|
|
<% if @notifications.any? %>
|
|
<%= link_to "Delete all", delete_all_notifications_path, method: :post, data: { turbo_method: :post, turbo_confirm: 'Are you sure you want to delete all notifications?' }, class: "btn btn-sm btn-warning" %>
|
|
<% end %>
|
|
</div>
|
|
<div class="mb-4">
|
|
<%= paginate @notifications %>
|
|
</div>
|
|
</div>
|
|
<div id="notifications" class="w-full max-w-2xl">
|
|
<% @notifications.each do |notification| %>
|
|
<%= render notification %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|