Fix to hide the label if no identifiers for Book Show LiveView.

dev
KKlochko 3 weeks ago
parent 30df53702b
commit 03b889b094

@ -88,14 +88,16 @@ 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> <%= if not Enum.empty?(@book.bids) do %>
<dt class="mb-2 font-semibold leading-none text-gray-900 dark:text-white">Identifiers</dt> <dl>
<%= for bid <- @book.bids do %> <dt class="mb-2 font-semibold leading-none text-gray-900 dark:text-white">Identifiers</dt>
<dd class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400"> <%= for bid <- @book.bids do %>
{bid.type}: {bid.bid} <dd class="mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400">
</dd> {bid.type}: {bid.bid}
<% end %> </dd>
</dl> <% end %>
</dl>
<% end %>
<%= if not is_nil(@book.dbi_server) do %> <%= if not is_nil(@book.dbi_server) do %>
<dl> <dl>
<dt class="mb-2 font-semibold leading-none text-gray-900 dark:text-white">From Server</dt> <dt class="mb-2 font-semibold leading-none text-gray-900 dark:text-white">From Server</dt>

Loading…
Cancel
Save