
-
- <%= Records.Record.format_short_label(record.format) %>
-
-
-
- <:col :let={{_id, record}}>
-
- <.link
- :for={artist <- record.artists}
- class=" hover:text-gray-500"
- patch={~p"/records?query=mbid:#{artist.musicbrainz_id}"}
- >
- <%= artist.name %>
-
-
-
<%= record.title %>
-
- <%= Records.Record.format_release(record.release) %>
-
-
- <:action :let={{_id, record}}>
-
- <.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
+ :for={artist <- record.artists}
+ class="hover:text-zinc-500"
+ patch={~p"/records?query=mbid:#{artist.musicbrainz_id}"}
+ >
+ <%= artist.name %>
+
+
+
+ <%= record.title %>
+
+
+ <%= Records.Record.format_release(record.release) %>
+
+ · <%= Records.Record.format_long_label(record.format) %> · <%= Records.Record.type_long_label(
+ record.type
+ ) %>
+
+
+
+
+
+
+ <%= Records.Record.format_long_label(record.format) %>
+ <%= Records.Record.type_long_label(record.type) %>
+
+
+
+
+
+
+ <.link
+ class="block px-3 py-1 text-sm leading-6 text-gray-900 hover:bg-gray-50"
+ role="menuitem"
+ tabindex="-1"
+ id={"actions-#{record.id}-show"}
+ navigate={~p"/records/#{record}"}
+ >
+ Show
+
+
+ View on MusicBrainz
+
+
+ <.link
+ class="block px-3 py-1 text-sm leading-6 text-gray-900 hover:bg-gray-50"
+ role="menuitem"
+ tabindex="-1"
+ id={"actions-#{record.id}-edit"}
+ patch={~p"/records/#{record}/edit"}
+ >
+ Edit
+
+
+ <.link
+ class="block px-3 py-1 text-sm leading-6 text-red-900 hover:bg-red-50"
+ role="menuitem"
+ tabindex="-1"
+ id={"actions-#{record.id}-delete"}
+ phx-click={JS.push("delete", value: %{id: record.id}) |> hide("##{id}")}
+ data-confirm="Are you sure?"
+ >
+ Delete
+
+
+
- <.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?"
- >
- <.icon name="hero-trash-solid" class="h-6 w-6" />
-
-
-
+
+
<.modal :if={@live_action == :edit} id="record-modal" show on_cancel={JS.patch(~p"/records")}>
<.live_component
diff --git a/test/music_library_web/live/record_index_test.exs b/test/music_library_web/live/record_index_test.exs
index 8d2928b7..ee298560 100644
--- a/test/music_library_web/live/record_index_test.exs
+++ b/test/music_library_web/live/record_index_test.exs
@@ -47,7 +47,8 @@ defmodule MusicLibraryWeb.RecordIndexTest do
assert record_row_html =~ escape(record.title)
assert record_row_html =~ to_string(record.release)
- assert record_row_html =~ Record.format_short_label(record.format)
+ assert record_row_html =~ Record.format_long_label(record.format)
+ assert record_row_html =~ Record.type_long_label(record.type)
assert record_row_html =~ record.release
assert record_row_html =~ ~p"/covers/#{record.id}?vsn=#{record.cover_hash}"
@@ -115,7 +116,8 @@ defmodule MusicLibraryWeb.RecordIndexTest do
assert record_row_html =~ escape(record.title)
assert record_row_html =~ to_string(record.release)
- assert record_row_html =~ Record.format_short_label(record.format)
+ assert record_row_html =~ Record.format_long_label(record.format)
+ assert record_row_html =~ Record.type_long_label(record.type)
assert record_row_html =~ record.release
assert record_row_html =~ ~p"/covers/#{record.id}?vsn=#{record.cover_hash}"
@@ -151,7 +153,8 @@ defmodule MusicLibraryWeb.RecordIndexTest do
assert record_row_html =~ escape(record.title)
assert record_row_html =~ to_string(record.release)
- assert record_row_html =~ Record.format_short_label(record.format)
+ assert record_row_html =~ Record.format_long_label(record.format)
+ assert record_row_html =~ Record.type_long_label(record.type)
assert record_row_html =~ record.release
assert record_row_html =~ ~p"/covers/#{record.id}?vsn=#{record.cover_hash}"