Add initial project
This commit is contained in:
30
lib/wish_web/live/item_live/show.html.heex
Normal file
30
lib/wish_web/live/item_live/show.html.heex
Normal file
@@ -0,0 +1,30 @@
|
||||
<.header>
|
||||
Item <%= @item.id %>
|
||||
<:subtitle>This is a item record from your database.</:subtitle>
|
||||
<:actions>
|
||||
<.link patch={~p"/items/#{@item}/show/edit"} phx-click={JS.push_focus()}>
|
||||
<.button>Edit item</.button>
|
||||
</.link>
|
||||
</:actions>
|
||||
</.header>
|
||||
|
||||
<.list>
|
||||
<:item title="Title"><%= @item.title %></:item>
|
||||
<:item title="Description"><%= @item.description %></:item>
|
||||
<:item title="Url"><%= @item.url %></:item>
|
||||
<:item title="Received"><%= @item.received %></:item>
|
||||
<:item title="Desire"><%= @item.desire %></:item>
|
||||
</.list>
|
||||
|
||||
<.back navigate={~p"/items"}>Back to items</.back>
|
||||
|
||||
<.modal :if={@live_action == :edit} id="item-modal" show on_cancel={JS.patch(~p"/items/#{@item}")}>
|
||||
<.live_component
|
||||
module={WishWeb.ItemLive.FormComponent}
|
||||
id={@item.id}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
item={@item}
|
||||
patch={~p"/items/#{@item}"}
|
||||
/>
|
||||
</.modal>
|
||||
Reference in New Issue
Block a user