<%= @note.title %>

<%= if @note.tags, do: @note.tags |> Enum.join(", ") %>

<%= gettext("Visibility: %{visibility}", visibility: @note.visibility) %>

<.link class="btn btn-primary" navigate={Routes.note_index_path(@socket, :index)}> <%= dgettext("actions", "back") %> <%= if is_owner?(@note, @current_user) do %> <.link class="btn btn-primary" patch={Routes.note_show_path(@socket, :edit, @note)}> <%= dgettext("actions", "edit") %> <% end %> <%= if is_owner_or_admin?(@note, @current_user) do %> <% end %>
<%= 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} current_user={@current_user} title={@page_title} action={@live_action} note={@note} return_to={Routes.note_show_path(@socket, :show, @note)} /> <% end %>