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

Loading…
Cancel
Save