|
|
|
@ -9,7 +9,7 @@ defmodule DecentralisedBookIndexWeb.AuthorLive.Show do
|
|
|
|
|
<:subtitle>This is a author record from your database.</:subtitle>
|
|
|
|
|
|
|
|
|
|
<:actions>
|
|
|
|
|
<.link patch={~p"/authors/#{@author}/show/edit"} phx-click={JS.push_focus()}>
|
|
|
|
|
<.link navigate={~p"/authors/#{@author}/edit"}>
|
|
|
|
|
<.button>Edit author</.button>
|
|
|
|
|
</.link>
|
|
|
|
|
</:actions>
|
|
|
|
@ -26,23 +26,6 @@ defmodule DecentralisedBookIndexWeb.AuthorLive.Show do
|
|
|
|
|
</.list>
|
|
|
|
|
|
|
|
|
|
<.back navigate={~p"/authors"}>Back to authors</.back>
|
|
|
|
|
|
|
|
|
|
<.modal
|
|
|
|
|
:if={@live_action == :edit}
|
|
|
|
|
id="author-modal"
|
|
|
|
|
show
|
|
|
|
|
on_cancel={JS.patch(~p"/authors/#{@author}")}
|
|
|
|
|
>
|
|
|
|
|
<.live_component
|
|
|
|
|
module={DecentralisedBookIndexWeb.AuthorLive.FormComponent}
|
|
|
|
|
id={@author.id}
|
|
|
|
|
title={@page_title}
|
|
|
|
|
action={@live_action}
|
|
|
|
|
current_user={@current_user}
|
|
|
|
|
author={@author}
|
|
|
|
|
patch={~p"/authors/#{@author}"}
|
|
|
|
|
/>
|
|
|
|
|
</.modal>
|
|
|
|
|
"""
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|