2022-07-25 20:08:40 -04:00
|
|
|
<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>
|
|
|
|
|
2022-07-25 22:05:54 -04:00
|
|
|
<span>
|
|
|
|
<%= live_patch("Edit", to: Routes.note_show_path(@socket, :edit, @note), class: "button") %>
|
2022-10-26 22:08:54 -04:00
|
|
|
</span>
|
|
|
|
| <span><%= live_redirect("Back", to: Routes.note_index_path(@socket, :index)) %></span>
|