memEx/lib/memex_web/live/note_live/show.html.heex
2022-11-03 18:23:17 -04:00

42 lines
867 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>
<%= live_patch("Edit", to: Routes.note_show_path(@socket, :edit, @note), class: "button") %>
</span>
| <span><%= live_redirect("Back", to: Routes.note_index_path(@socket, :index)) %></span>