Add creating and basic editing of translation
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
<.link navigate={~p"/articles/#{article}"}>Show</.link>
|
||||
</div>
|
||||
<.link patch={~p"/articles/#{article}/edit"}>Edit</.link>
|
||||
<.link navigate={~p"/translations/new?article_id=#{article}"}>New Translation</.link>
|
||||
</:action>
|
||||
<:action :let={article}>
|
||||
<.link phx-click={JS.push("delete", value: %{id: article.id})} data-confirm="Are you sure?">
|
||||
|
||||
@ -47,4 +47,12 @@ defmodule OutlookWeb.ArticleLive.NewComponents do
|
||||
<.button phx-click="approve_translation_units">Continue</.button>
|
||||
"""
|
||||
end
|
||||
|
||||
def final_form(assigns) do
|
||||
~H"""
|
||||
<div>Final Form</div>
|
||||
<!-- this should eventually become the first stage because url will be needed for processing of images -->
|
||||
<.button phx-click="save">Save</.button>
|
||||
"""
|
||||
end
|
||||
end
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
<%= InternalTree.render_html(@article.content) |> raw %>
|
||||
</div>
|
||||
|
||||
<.link navigate={~p"/translations/new?article_id=#{@article.id}"}>New Translation</.link>
|
||||
|
||||
<.back navigate={~p"/articles"}>Back to articles</.back>
|
||||
|
||||
<.modal :if={@live_action == :edit} id="article-modal" show on_cancel={JS.patch(~p"/articles/#{@article}")}>
|
||||
|
||||
Reference in New Issue
Block a user