2022-11-17 22:30:01 -05:00
|
|
|
<h1>show context</h1>
|
2022-07-25 20:11:08 -04:00
|
|
|
|
|
|
|
<%= if @live_action in [:edit] do %>
|
|
|
|
<.modal return_to={Routes.context_show_path(@socket, :show, @context)}>
|
|
|
|
<.live_component
|
|
|
|
module={MemexWeb.ContextLive.FormComponent}
|
|
|
|
id={@context.id}
|
|
|
|
title={@page_title}
|
|
|
|
action={@live_action}
|
|
|
|
context={@context}
|
|
|
|
return_to={Routes.context_show_path(@socket, :show, @context)}
|
|
|
|
/>
|
|
|
|
</.modal>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<strong>Title:</strong>
|
|
|
|
<%= @context.title %>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<strong>Content:</strong>
|
|
|
|
<%= @context.content %>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<strong>Tag:</strong>
|
|
|
|
<%= @context.tag %>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<strong>Visibility:</strong>
|
|
|
|
<%= @context.visibility %>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
2022-07-25 22:05:54 -04:00
|
|
|
<span>
|
2022-11-16 21:11:02 -05:00
|
|
|
<.link patch={Routes.context_show_path(@socket, :edit, @context)} class="button">
|
2022-11-17 22:30:01 -05:00
|
|
|
<%= dgettext("actions", "edit") %>
|
2022-11-16 21:11:02 -05:00
|
|
|
</.link>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
<span>
|
|
|
|
<.link navigate={Routes.context_index_path(@socket, :index)}>
|
|
|
|
<%= dgettext("actions", "Back") %>
|
|
|
|
</.link>
|
2022-10-26 22:08:54 -04:00
|
|
|
</span>
|