Files
phoenix-ausblick/lib/outlook_web/live/article_live/show.html.heex
Thelonius Kort b7bd9195b6 Add importing html and save it to Article
Additionally defines a wizard logic which is partially unused yet.
2022-12-29 16:43:52 +01:00

33 lines
881 B
Plaintext

<.header>
<a href={@article.url}><%= @article.title %></a>
<:subtitle>
<div class="flex">
<div class="p-4"><%= @article.author.name %></div>
<div class="p-4"><%= @article.date %></div>
</div>
</:subtitle>
<:actions>
<.link patch={~p"/articles/#{@article}/show/edit"} phx-click={JS.push_focus()}>
<.button>Edit article</.button>
</.link>
</:actions>
</.header>
<div class="article">
<%= InternalTree.render_html(@article.content) |> raw %>
</div>
<.back navigate={~p"/articles"}>Back to articles</.back>
<.modal :if={@live_action == :edit} id="article-modal" show on_cancel={JS.patch(~p"/articles/#{@article}")}>
<.live_component
module={OutlookWeb.ArticleLive.FormComponent}
id={@article.id}
title={@page_title}
action={@live_action}
article={@article}
navigate={~p"/articles/#{@article}"}
/>
</.modal>