diff --git a/app/views/dialog/playlists/_playlist.html.erb b/app/views/dialog/playlists/_playlist.html.erb index 39c6f05a..e70f06c7 100644 --- a/app/views/dialog/playlists/_playlist.html.erb +++ b/app/views/dialog/playlists/_playlist.html.erb @@ -1,3 +1,4 @@ -<%= button_to playlist_songs_path(playlist, song_id: params[:song_id]), method: :post, class: 'c-list__item u-cursor-pointer', form: { 'data-turbo-frame': 'turbo-playlist', 'data-test-id': 'dialog_playlist' } do %> + diff --git a/app/views/dialog/playlists/index.html.erb b/app/views/dialog/playlists/index.html.erb index d46b9261..67feadce 100644 --- a/app/views/dialog/playlists/index.html.erb +++ b/app/views/dialog/playlists/index.html.erb @@ -3,16 +3,21 @@ <% end %> <% if @playlists.present? %> -
-
- <%= render partial: 'dialog/playlists/playlist', collection: @playlists, cached: true %> + <%= form_tag nil, 'data-turbo-frame': 'turbo-playlist' do %> + <%= hidden_field_tag :song_id, params[:song_id] %> +
+
+ <%= render partial: 'dialog/playlists/playlist', collection: @playlists, cached: true %> +
+
+ <% if @pagy.next %> + <%= loader_tag %> + <% end %> +
-
- <% if @pagy.next %> - <%= loader_tag %> - <% end %> -
-
+ <% end %> <% else %> <%= empty_alert_tag %> <% end %>