Improve logic and add working "delete" links

This commit is contained in:
Thelonius Kort
2023-02-14 21:02:48 +01:00
parent 7297a907da
commit faf2bb0e2e
8 changed files with 45 additions and 39 deletions

View File

@ -22,19 +22,3 @@
</.link>
</:action>
</.table>
<.modal
:if={@live_action in [:new, :edit]}
id="translation-modal"
show
on_cancel={JS.navigate(~p"/translations")}
>
<.live_component
module={OutlookWeb.TranslationLive.FormComponent}
id={@translation.id || :new}
title={@page_title}
action={@live_action}
translation={@translation}
navigate={~p"/translations"}
/>
</.modal>

View File

@ -22,4 +22,4 @@
<.render_doc tree={InternalTree.render_translation(@translation.article.content, @translation.content)} />
</div>
<.back navigate={~p"/translations"}>Back to translations</.back>
<.back navigate={~p"/articles/#{@translation.article}"}>Back to <article></article></.back>