Update to allow a Book to have no Publisher.
This commit is contained in:
@@ -64,12 +64,14 @@ defmodule DecentralisedBookIndexWeb.BookLive.Show do
|
||||
<dt class="mb-2 font-semibold leading-none text-gray-900 dark:text-white">Description</dt>
|
||||
<dd class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">{@book.description}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt class="mb-2 font-semibold leading-none text-gray-900 dark:text-white">Publisher</dt>
|
||||
<dd class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">
|
||||
{@book.publisher.name}
|
||||
</dd>
|
||||
</dl>
|
||||
<%= if not is_nil(@book.publisher) do %>
|
||||
<dl>
|
||||
<dt class="mb-2 font-semibold leading-none text-gray-900 dark:text-white">Publisher</dt>
|
||||
<dd class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">
|
||||
{@book.publisher.name}
|
||||
</dd>
|
||||
</dl>
|
||||
<% end %>
|
||||
<dl>
|
||||
<dt class="mb-2 font-semibold leading-none text-gray-900 dark:text-white">Published</dt>
|
||||
<dd class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">{@book.published}</dd>
|
||||
|
||||
Reference in New Issue
Block a user