memEx/lib/memex_web/live/note_live/show.html.heex
2022-11-16 22:50:22 -05:00

49 lines
936 B
Plaintext

<h1>Show Note</h1>
<%= if @live_action in [:edit] do %>
<.modal return_to={Routes.note_show_path(@socket, :show, @note)}>
<.live_component
module={MemexWeb.NoteLive.FormComponent}
id={@note.id}
title={@page_title}
action={@live_action}
note={@note}
return_to={Routes.note_show_path(@socket, :show, @note)}
/>
</.modal>
<% end %>
<ul>
<li>
<strong>Title:</strong>
<%= @note.title %>
</li>
<li>
<strong>Content:</strong>
<%= @note.content %>
</li>
<li>
<strong>Tag:</strong>
<%= @note.tag %>
</li>
<li>
<strong>Visibility:</strong>
<%= @note.visibility %>
</li>
</ul>
<span>
<.link patch={Routes.note_show_path(@socket, :edit, @note)} class="button">
<%= dgettext("actions", "Edit") %>
</.link>
</span>
|
<span>
<.link patch={Routes.note_index_path(@socket, :index)}>
<%= dgettext("actions", "Back") %>
</.link>
</span>