29 lines
791 B
Plaintext
29 lines
791 B
Plaintext
|
<.header>
|
||
|
User <%= @user.id %>
|
||
|
<:subtitle>This is a user record from your database.</:subtitle>
|
||
|
<:actions>
|
||
|
<.link patch={~p"/users/#{@user}/show/edit"} phx-click={JS.push_focus()}>
|
||
|
<.button>Edit user</.button>
|
||
|
</.link>
|
||
|
</:actions>
|
||
|
</.header>
|
||
|
|
||
|
<.list>
|
||
|
<:item title="Name"><%= @user.name %></:item>
|
||
|
<:item title="Avatar url"><%= @user.avatar_url %></:item>
|
||
|
<:item title="Color"><%= @user.color %></:item>
|
||
|
</.list>
|
||
|
|
||
|
<.back navigate={~p"/users"}>Back to users</.back>
|
||
|
|
||
|
<.modal :if={@live_action == :edit} id="user-modal" show on_cancel={JS.patch(~p"/users/#{@user}")}>
|
||
|
<.live_component
|
||
|
module={HomemanWeb.UserLive.FormComponent}
|
||
|
id={@user.id}
|
||
|
title={@page_title}
|
||
|
action={@live_action}
|
||
|
user={@user}
|
||
|
patch={~p"/users/#{@user}"}
|
||
|
/>
|
||
|
</.modal>
|