dings with user assoc
This commit is contained in:
31
lib/dinge_web/live/ding_live/show.html.heex
Normal file
31
lib/dinge_web/live/ding_live/show.html.heex
Normal file
@ -0,0 +1,31 @@
|
||||
<.header>
|
||||
Ding <%= @ding.id %>
|
||||
<:subtitle>This is a ding record from your database.</:subtitle>
|
||||
<:actions>
|
||||
<.link patch={~p"/dings/#{@ding}/show/edit"} phx-click={JS.push_focus()}>
|
||||
<.button>Edit ding</.button>
|
||||
</.link>
|
||||
</:actions>
|
||||
</.header>
|
||||
|
||||
<.list>
|
||||
<:item title="Title"><%= @ding.title %></:item>
|
||||
<:item title="Count"><%= @ding.count %></:item>
|
||||
<:item title="Target count"><%= @ding.target_count %></:item>
|
||||
<:item title="Ding type"><%= @ding.ding_type %></:item>
|
||||
<:item title="Target type"><%= @ding.target_type %></:item>
|
||||
<:item title="Status"><%= @ding.status %></:item>
|
||||
</.list>
|
||||
|
||||
<.back navigate={~p"/dings"}>Back to dings</.back>
|
||||
|
||||
<.modal :if={@live_action == :edit} id="ding-modal" show on_cancel={JS.patch(~p"/dings/#{@ding}")}>
|
||||
<.live_component
|
||||
module={DingeWeb.DingLive.FormComponent}
|
||||
id={@ding.id}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
ding={@ding}
|
||||
patch={~p"/dings/#{@ding}"}
|
||||
/>
|
||||
</.modal>
|
Reference in New Issue
Block a user