|
|
|
@ -13,13 +13,12 @@ defmodule DecentralisedBookIndexWeb.PublisherLive.Index do
|
|
|
|
|
</:actions>
|
|
|
|
|
</.header>
|
|
|
|
|
|
|
|
|
|
<div class="pt-2">
|
|
|
|
|
<.table
|
|
|
|
|
id="publishers"
|
|
|
|
|
rows={@streams.publishers}
|
|
|
|
|
row_click={fn {_id, publisher} -> JS.navigate(~p"/publishers/#{publisher}") end}
|
|
|
|
|
>
|
|
|
|
|
<:col :let={{_id, publisher}} label="Id">{publisher.id}</:col>
|
|
|
|
|
|
|
|
|
|
<:col :let={{_id, publisher}} label="Name">{publisher.name}</:col>
|
|
|
|
|
|
|
|
|
|
<:action :let={{_id, publisher}}>
|
|
|
|
@ -29,16 +28,8 @@ defmodule DecentralisedBookIndexWeb.PublisherLive.Index do
|
|
|
|
|
|
|
|
|
|
<.link patch={~p"/publishers/#{publisher}/edit"}>Edit</.link>
|
|
|
|
|
</:action>
|
|
|
|
|
|
|
|
|
|
<:action :let={{id, publisher}}>
|
|
|
|
|
<.link
|
|
|
|
|
phx-click={JS.push("delete", value: %{id: publisher.id}) |> hide("##{id}")}
|
|
|
|
|
data-confirm="Are you sure?"
|
|
|
|
|
>
|
|
|
|
|
Delete
|
|
|
|
|
</.link>
|
|
|
|
|
</:action>
|
|
|
|
|
</.table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<.modal
|
|
|
|
|
:if={@live_action in [:new, :edit]}
|
|
|
|
|