Files
phoenix-ausblick/lib/outlook_web/live/author_live/show.html.heex
2022-12-27 23:23:16 +01:00

33 lines
1.0 KiB
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>
<.link patch={~p"/articles/new?author_id=#{@author}"} phx-click={JS.push_focus()}>
<.button>New article</.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>