Update the Server Show LiveView.
This commit is contained in:
@@ -5,11 +5,10 @@ defmodule DecentralisedBookIndexWeb.DbiServerLive.Show do
|
||||
def render(assigns) do
|
||||
~H"""
|
||||
<.header>
|
||||
Dbi server {@dbi_server.id}
|
||||
<:subtitle>This is a dbi_server record from your database.</:subtitle>
|
||||
{@dbi_server.name}
|
||||
|
||||
<:actions>
|
||||
<.link patch={~p"/dbi_servers/#{@dbi_server}/show/edit"} phx-click={JS.push_focus()}>
|
||||
<.link patch={~p"/servers/#{@dbi_server}/show/edit"} phx-click={JS.push_focus()}>
|
||||
<.edit_button>
|
||||
Edit
|
||||
</.edit_button>
|
||||
@@ -25,13 +24,13 @@ defmodule DecentralisedBookIndexWeb.DbiServerLive.Show do
|
||||
<:item title="Url">{@dbi_server.url}</:item>
|
||||
</.list>
|
||||
|
||||
<.back navigate={~p"/dbi_servers"}>Back to dbi_servers</.back>
|
||||
<.back navigate={~p"/servers"}>Back to servers</.back>
|
||||
|
||||
<.modal
|
||||
:if={@live_action == :edit}
|
||||
id="dbi_server-modal"
|
||||
show
|
||||
on_cancel={JS.patch(~p"/dbi_servers/#{@dbi_server}")}
|
||||
on_cancel={JS.patch(~p"/servers/#{@dbi_server}")}
|
||||
>
|
||||
<.live_component
|
||||
module={DecentralisedBookIndexWeb.DbiServerLive.FormComponent}
|
||||
@@ -40,7 +39,7 @@ defmodule DecentralisedBookIndexWeb.DbiServerLive.Show do
|
||||
action={@live_action}
|
||||
current_user={@current_user}
|
||||
dbi_server={@dbi_server}
|
||||
patch={~p"/dbi_servers/#{@dbi_server}"}
|
||||
patch={~p"/servers/#{@dbi_server}"}
|
||||
/>
|
||||
</.modal>
|
||||
"""
|
||||
@@ -62,6 +61,6 @@ defmodule DecentralisedBookIndexWeb.DbiServerLive.Show do
|
||||
)}
|
||||
end
|
||||
|
||||
defp page_title(:show), do: "Show Dbi server"
|
||||
defp page_title(:edit), do: "Edit Dbi server"
|
||||
defp page_title(:show), do: "Show server"
|
||||
defp page_title(:edit), do: "Edit server"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user