<%= if @book.cover_image_url != nil do %>
-

+

<% else %>
-
- <.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,