diff --git a/lib/decentralised_book_index_web/live/book_live/show.ex b/lib/decentralised_book_index_web/live/book_live/show.ex index 10840d9..e06fc60 100644 --- a/lib/decentralised_book_index_web/live/book_live/show.ex +++ b/lib/decentralised_book_index_web/live/book_live/show.ex @@ -31,34 +31,43 @@ defmodule DecentralisedBookIndexWeb.BookLive.Show do -
+
<%= if @book.cover_image_url != nil do %> - {"#{@book.title} + {"#{@book.title} <% else %> -
+
<% end %> +
- <.list> - <:item title="Id">{@book.id} - - <:item title="Title">{@book.title} - - <:item title="Description">{@book.description} - - <:item title="Published">{@book.published} - - <:item title="Language">{@book.language} - - <:item title="Format">{@book.format} - - <:item title="Page count">{@book.page_count} - - <:item title="Cover image url">{@book.cover_image_url} - +
+
+
Description
+
{@book.description}
+
+
+
Publisher
+
{@book.publisher.name}
+
+
+
Published
+
{@book.published}
+
+
+
Format
+
{@book.format}
+
+
+
Page Count
+
{@book.page_count}
+
+
+
Language
+
{@book.language}
+
<%= if not Enum.empty?(@alternative_editions) do %> @@ -84,7 +93,7 @@ defmodule DecentralisedBookIndexWeb.BookLive.Show do @impl true def handle_params(%{"id" => id}, _, socket) do - book = Ash.get!(Metadata.Book, id, actor: socket.assigns.current_user, load: [:author_roles]) + book = Ash.get!(Metadata.Book, id, actor: socket.assigns.current_user, load: [:author_roles, :publisher]) alternative_editions = Metadata.get_book_alternative_editions!(book) {:noreply,