wild/lib/wild_web/live/book_read_live/show.html.heex

30 lines
995 B
Text

<.header>
Book read {@book_read.id}
<:subtitle>This is a book_read record from your database.</:subtitle>
<:actions>
<.link patch={~p"/book_reads/#{@book_read}/show/edit"} phx-click={JS.push_focus()}>
<.button>Edit book_read</.button>
</.link>
</:actions>
</.header>
<.list>
<:item title="Rating">{@book_read.rating}</:item>
<:item title="Thoughts">{@book_read.thoughts}</:item>
<:item title="Read start">{@book_read.read_start}</:item>
<:item title="Read finish">{@book_read.read_finish}</:item>
<:item title="Progress">{@book_read.progress}</:item>
</.list>
<.back navigate={~p"/book_reads"}>Back to book_reads</.back>
<.modal :if={@live_action == :edit} id="book_read-modal" show on_cancel={JS.patch(~p"/book_reads/#{@book_read}")}>
<.live_component
module={WildWeb.BookReadLive.FormComponent}
id={@book_read.id}
title={@page_title}
action={@live_action}
book_read={@book_read}
patch={~p"/book_reads/#{@book_read}"}
/>
</.modal>