2022-09-05 12:40:26 -07:00
|
|
|
= turbo_stream.append "notifications" do
|
|
|
|
- @notifications.each do |notification|
|
|
|
|
%li.card
|
|
|
|
.card-body
|
2023-01-04 07:12:43 -08:00
|
|
|
.d-flex
|
2022-09-05 12:40:26 -07:00
|
|
|
= render "notifications/type/#{notification.target.class.name.downcase.split('::').last}", notification: notification
|
|
|
|
|
|
|
|
= turbo_stream.update "paginator" do
|
|
|
|
- if @more_data_available
|
2023-01-21 10:36:08 -08:00
|
|
|
= button_to t("voc.load"), notifications_path(type: params[:type]),
|
|
|
|
class: "btn btn-light",
|
|
|
|
method: :get,
|
|
|
|
params: { last_id: @notifications_last_id },
|
2023-03-19 06:42:01 -07:00
|
|
|
data: { controller: :hotkey, hotkey: "." },
|
2023-01-21 10:36:08 -08:00
|
|
|
form: { data: { turbo_stream: true } }
|