<.header> Author <%= @author.id %> <:subtitle>This is a author record from your database. <:actions> <.link patch={~p"/authors/#{@author}/show/edit"} phx-click={JS.push_focus()}> <.button>Edit author <.link patch={~p"/articles/new?author_id=#{@author}"} phx-click={JS.push_focus()}> <.button>New article <.list> <:item title="Name"><%= @author.name %> <:item title="Description"><%= @author.description %> <:item title="Homepage name"><%= @author.homepage_name %> <:item title="Homepage url"><%= @author.homepage_url %> <.table id="articles" rows={@author.articles} row_click={&JS.navigate(~p"/articles/#{&1}")}> <:col :let={article} label="Title"><%= article.title %> <%!-- <:col :let={article} label="Content"><%= article.content %> --%> <:col :let={article} label="Url"><%= article.url %> <:col :let={article} label="Language"><%= article.language %> <:col :let={article} label="Date"><%= article.date %> <:action :let={article}>
<.link navigate={~p"/articles/#{article}"}>Show
<.link patch={~p"/articles/#{article}/edit"}>Edit <:action :let={article}> <.link phx-click={JS.push("delete_article", value: %{id: article.id})} data-confirm="Are you sure?"> Delete <.back navigate={~p"/authors"}>Back to authors <.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}"} />