Navigate to individual artist from collection
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
defmodule MusicLibraryWeb.RecordLive.Index do
|
defmodule MusicLibraryWeb.RecordLive.Index do
|
||||||
use MusicLibraryWeb, :live_view
|
use MusicLibraryWeb, :live_view
|
||||||
import MusicLibraryWeb.Pagination
|
import MusicLibraryWeb.Pagination
|
||||||
import MusicLibraryWeb.ArtistHelpers
|
|
||||||
|
|
||||||
alias MusicLibrary.Records
|
alias MusicLibrary.Records
|
||||||
|
|
||||||
@@ -65,7 +64,7 @@ defmodule MusicLibraryWeb.RecordLive.Index do
|
|||||||
total_records = Records.search_records_count(query)
|
total_records = Records.search_records_count(query)
|
||||||
|
|
||||||
record_list_params =
|
record_list_params =
|
||||||
socket.assigns.record_list_params
|
@default_records_list_params
|
||||||
|> merge_query(params["query"])
|
|> merge_query(params["query"])
|
||||||
|> merge_pagination(params, total_records)
|
|> merge_pagination(params, total_records)
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,14 @@
|
|||||||
</span>
|
</span>
|
||||||
</:col>
|
</:col>
|
||||||
<:col :let={{_id, record}}>
|
<:col :let={{_id, record}}>
|
||||||
<p class="text-sm max-sm:text-xs"><%= format_artist_names(record.artists) %></p>
|
<p class="text-sm max-sm:text-xs">
|
||||||
|
<.link
|
||||||
|
:for={artist <- record.artists}
|
||||||
|
patch={~p"/records?query=mbid:#{artist.musicbrainz_id}"}
|
||||||
|
>
|
||||||
|
<%= artist.name %>
|
||||||
|
</.link>
|
||||||
|
</p>
|
||||||
<p class="text-base font-semibold text-wrap max-sm:text-xs"><%= record.title %></p>
|
<p class="text-base font-semibold text-wrap max-sm:text-xs"><%= record.title %></p>
|
||||||
<p class="text-sm max-sm:text-xs">
|
<p class="text-sm max-sm:text-xs">
|
||||||
<%= Records.Record.format_release(record.release) %>
|
<%= Records.Record.format_release(record.release) %>
|
||||||
|
|||||||
Reference in New Issue
Block a user