From 02dccaf042fc50f44c6afbbca2a1fe6f4c47f814 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sat, 28 Sep 2024 15:55:50 +0100 Subject: [PATCH] Use icons in record list --- .../live/record_live/index.html.heex | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/lib/music_library_web/live/record_live/index.html.heex b/lib/music_library_web/live/record_live/index.html.heex index 8c53511e..abd3eae2 100644 --- a/lib/music_library_web/live/record_live/index.html.heex +++ b/lib/music_library_web/live/record_live/index.html.heex @@ -32,20 +32,41 @@

<%= record.year %>

<:action :let={{_id, record}}> - <.link href={musicbrainz_url(record)} target=".blank">MB +
+ <.link href={musicbrainz_url(record)} target=".blank"> + MusicBrainz + +
+ <.link href={musicbrainz_url(record)} target=".blank"> + <.icon name="hero-arrow-top-right-on-square" class="h-6 w-6" /> + <:action :let={{_id, record}}>
<.link navigate={~p"/records/#{record}"}>Show
- <.link patch={~p"/records/#{record}/edit"}>Edit + +
+ <.link patch={~p"/records/#{record}/edit"}>Edit +
+ <.link patch={~p"/records/#{record}/edit"}> + <.icon name="hero-pencil-square-solid" class="h-6 w-6" /> + <:action :let={{id, record}}> +
+ <.link + phx-click={JS.push("delete", value: %{id: record.id}) |> hide("##{id}")} + data-confirm="Are you sure?" + > + Delete + +
<.link phx-click={JS.push("delete", value: %{id: record.id}) |> hide("##{id}")} data-confirm="Are you sure?" > - Delete + <.icon name="hero-trash-solid" class="h-6 w-6" />