Improve logic and add working "delete" links
This commit is contained in:
@ -28,11 +28,11 @@
|
||||
</div>
|
||||
<.link navigate={~p"/translations/#{translation.id}/edit"}>Edit</.link>
|
||||
</:action>
|
||||
<%!-- <:action :let={translation}>
|
||||
<.link phx-click={JS.push("delete", value: %{id: translation.id})} data-confirm="Are you sure?">
|
||||
<:action :let={translation}>
|
||||
<.link phx-click={JS.push("delete_translation", value: %{id: translation.id})} data-confirm="Are you sure?">
|
||||
Delete
|
||||
</.link>
|
||||
</:action> --%>
|
||||
</:action>
|
||||
</.table>
|
||||
|
||||
<div class="article">
|
||||
@ -40,10 +40,11 @@
|
||||
<a href="#" class="hide-link" phx-click={JS.remove_class("show-boundary", to: ".article")}>hide boundaries</a>
|
||||
<.render_doc tree={@article_content} />
|
||||
</div>
|
||||
<div class="h-10" />
|
||||
|
||||
<.link navigate={~p"/translations/new?article_id=#{@article.id}"}>New Translation</.link>
|
||||
<.link class="text-sm font-semibold" navigate={~p"/translations/new?article_id=#{@article.id}"}>New Translation</.link>
|
||||
|
||||
<.back navigate={~p"/articles"}>Back to articles</.back>
|
||||
<.back navigate={~p"/authors/#{@article.author}"}>Back to author</.back>
|
||||
|
||||
<.modal :if={@live_action == :edit} id="article-modal" show on_cancel={JS.patch(~p"/articles/#{@article}")}>
|
||||
<.live_component
|
||||
|
||||
Reference in New Issue
Block a user