Retrospring/app/views/notifications/index.js.erb

9 lines
524 B
Plaintext
Raw Normal View History

2015-01-08 09:22:27 -08:00
$('#notifications').append('<% @notifications.each do |notification|
2020-05-08 19:39:09 -07:00
%><li class="list-group-item"><div class="media"><%= j render "notifications/type/#{notification.target_type.downcase}", notification: notification
%></div></li><% end %>');
<% if @more_data_available %>
$('#pagination').html('<%= j render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @notifications_last_id, permitted_params: %i[type] %>');
2015-01-08 09:22:27 -08:00
<% else %>
$('#pagination, #load-more-btn').remove();
<% end %>