mix phx.gen.live Authors Author authors name:string description:text homepage_name:string homepage_url:string
30 lines
918 B
Plaintext
30 lines
918 B
Plaintext
<.header>
|
|
Author <%= @author.id %>
|
|
<:subtitle>This is a author record from your database.</:subtitle>
|
|
<:actions>
|
|
<.link patch={~p"/authors/#{@author}/show/edit"} phx-click={JS.push_focus()}>
|
|
<.button>Edit author</.button>
|
|
</.link>
|
|
</:actions>
|
|
</.header>
|
|
|
|
<.list>
|
|
<:item title="Name"><%= @author.name %></:item>
|
|
<:item title="Description"><%= @author.description %></:item>
|
|
<:item title="Homepage name"><%= @author.homepage_name %></:item>
|
|
<:item title="Homepage url"><%= @author.homepage_url %></:item>
|
|
</.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={OutlookWeb.AuthorLive.FormComponent}
|
|
id={@author.id}
|
|
title={@page_title}
|
|
action={@live_action}
|
|
author={@author}
|
|
navigate={~p"/authors/#{@author}"}
|
|
/>
|
|
</.modal>
|