Add importing html and save it to Article

Additionally defines a wizard logic which is partially unused yet.
This commit is contained in:
Thelonius Kort
2022-12-29 16:43:52 +01:00
parent 60a22d011e
commit b7bd9195b6
24 changed files with 452 additions and 25 deletions

View File

@ -18,6 +18,26 @@
<:item title="Homepage url"><%= @author.homepage_url %></:item>
</.list>
<.table id="articles" rows={@author.articles} row_click={&JS.navigate(~p"/articles/#{&1}")}>
<:col :let={article} label="Title"><%= article.title %></:col>
<%!-- <:col :let={article} label="Content"><%= article.content %></:col> --%>
<:col :let={article} label="Url"><%= article.url %></:col>
<:col :let={article} label="Language"><%= article.language %></:col>
<:col :let={article} label="Date"><%= article.date %></:col>
<:action :let={article}>
<div class="sr-only">
<.link navigate={~p"/articles/#{article}"}>Show</.link>
</div>
<.link patch={~p"/articles/#{article}/edit"}>Edit</.link>
</:action>
<:action :let={article}>
<.link phx-click={JS.push("delete", value: %{id: article.id})} data-confirm="Are you sure?">
Delete
</.link>
</:action>
</.table>
<.back navigate={~p"/authors"}>Back to authors</.back>
<.modal :if={@live_action == :edit} id="author-modal" show on_cancel={JS.patch(~p"/authors/#{@author}")}>