Remove the table from Book and Author Index LiveViews.
This commit is contained in:
@@ -17,37 +17,6 @@ defmodule DecentralisedBookIndexWeb.AuthorLive.Index do
|
|||||||
current_user={@current_user}
|
current_user={@current_user}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<.table
|
|
||||||
id="authors"
|
|
||||||
rows={@streams.authors}
|
|
||||||
row_click={fn {_id, author} -> JS.navigate(~p"/authors/#{author}") end}
|
|
||||||
>
|
|
||||||
<:col :let={{_id, author}} label="Id">{author.id}</:col>
|
|
||||||
|
|
||||||
<:col :let={{_id, author}} label="Name">{author.name}</:col>
|
|
||||||
|
|
||||||
<:col :let={{_id, author}} label="Description">{author.description}</:col>
|
|
||||||
|
|
||||||
<:col :let={{_id, author}} label="Avatar url">{author.avatar_url}</:col>
|
|
||||||
|
|
||||||
<:action :let={{_id, author}}>
|
|
||||||
<div class="sr-only">
|
|
||||||
<.link navigate={~p"/authors/#{author}"}>Show</.link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<.link patch={~p"/authors/#{author}/edit"}>Edit</.link>
|
|
||||||
</:action>
|
|
||||||
|
|
||||||
<:action :let={{id, author}}>
|
|
||||||
<.link
|
|
||||||
phx-click={JS.push("delete", value: %{id: author.id}) |> hide("##{id}")}
|
|
||||||
data-confirm="Are you sure?"
|
|
||||||
>
|
|
||||||
Delete
|
|
||||||
</.link>
|
|
||||||
</:action>
|
|
||||||
</.table>
|
|
||||||
|
|
||||||
<%= if Enum.empty?(@page.results) do %>
|
<%= if Enum.empty?(@page.results) do %>
|
||||||
<div class="flex justify-center ">
|
<div class="flex justify-center ">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -19,45 +19,6 @@ defmodule DecentralisedBookIndexWeb.BookLive.Index do
|
|||||||
current_user={@current_user}
|
current_user={@current_user}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<.table
|
|
||||||
id="books"
|
|
||||||
rows={@streams.books}
|
|
||||||
row_click={fn {_id, book} -> JS.navigate(~p"/books/#{book}") end}
|
|
||||||
>
|
|
||||||
<:col :let={{_id, book}} label="Id">{book.id}</:col>
|
|
||||||
|
|
||||||
<:col :let={{_id, book}} label="Title">{book.title}</:col>
|
|
||||||
|
|
||||||
<:col :let={{_id, book}} label="Description">{book.description}</:col>
|
|
||||||
|
|
||||||
<:col :let={{_id, book}} label="Published">{book.published}</:col>
|
|
||||||
|
|
||||||
<:col :let={{_id, book}} label="Language">{book.language}</:col>
|
|
||||||
|
|
||||||
<:col :let={{_id, book}} label="Format">{book.format}</:col>
|
|
||||||
|
|
||||||
<:col :let={{_id, book}} label="Page count">{book.page_count}</:col>
|
|
||||||
|
|
||||||
<:col :let={{_id, book}} label="Cover image url">{book.cover_image_url}</:col>
|
|
||||||
|
|
||||||
<:action :let={{_id, book}}>
|
|
||||||
<div class="sr-only">
|
|
||||||
<.link navigate={~p"/books/#{book}"}>Show</.link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<.link patch={~p"/books/#{book}/edit"}>Edit</.link>
|
|
||||||
</:action>
|
|
||||||
|
|
||||||
<:action :let={{id, book}}>
|
|
||||||
<.link
|
|
||||||
phx-click={JS.push("delete", value: %{id: book.id}) |> hide("##{id}")}
|
|
||||||
data-confirm="Are you sure?"
|
|
||||||
>
|
|
||||||
Delete
|
|
||||||
</.link>
|
|
||||||
</:action>
|
|
||||||
</.table>
|
|
||||||
|
|
||||||
<%= if Enum.empty?(@page.results) do %>
|
<%= if Enum.empty?(@page.results) do %>
|
||||||
<div class="flex justify-center ">
|
<div class="flex justify-center ">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user