|
|
@ -68,6 +68,12 @@ defmodule DecentralisedBookIndexWeb.BookLive.Show do
|
|
|
|
<dt class="mb-2 font-semibold leading-none text-gray-900 dark:text-white">Language</dt>
|
|
|
|
<dt class="mb-2 font-semibold leading-none text-gray-900 dark:text-white">Language</dt>
|
|
|
|
<dd class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">{@book.language}</dd>
|
|
|
|
<dd class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">{@book.language}</dd>
|
|
|
|
</dl>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
|
|
|
|
<dt class="mb-2 font-semibold leading-none text-gray-900 dark:text-white">Identifiers</dt>
|
|
|
|
|
|
|
|
<%= for bid <- @book.bids do %>
|
|
|
|
|
|
|
|
<dd class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">{bid.type}: {bid.bid}</dd>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<%= if not Enum.empty?(@alternative_editions) do %>
|
|
|
|
<%= if not Enum.empty?(@alternative_editions) do %>
|
|
|
@ -93,7 +99,7 @@ defmodule DecentralisedBookIndexWeb.BookLive.Show do
|
|
|
|
|
|
|
|
|
|
|
|
@impl true
|
|
|
|
@impl true
|
|
|
|
def handle_params(%{"id" => id}, _, socket) do
|
|
|
|
def handle_params(%{"id" => id}, _, socket) do
|
|
|
|
book = Ash.get!(Metadata.Book, id, actor: socket.assigns.current_user, load: [:author_roles, :publisher])
|
|
|
|
book = Ash.get!(Metadata.Book, id, actor: socket.assigns.current_user, load: [:bids, :author_roles, :publisher])
|
|
|
|
alternative_editions = Metadata.get_book_alternative_editions!(book)
|
|
|
|
alternative_editions = Metadata.get_book_alternative_editions!(book)
|
|
|
|
|
|
|
|
|
|
|
|
{:noreply,
|
|
|
|
{:noreply,
|
|
|
|